//String chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.*~&@";\r
int check = 0;\r
\r
+ String sequence = seq.toUpperCase();\r
+\r
String index = "--------------------------------------&---*---.-----------------@ABCDEFGHIJKLMNOPQRSTUVWXYZ------ABCDEFGHIJKLMNOPQRSTUVWXYZ----@";\r
index += "--------------------------------------------------------------------------------------------------------------------------------";\r
\r
- for (int i = 0; i < seq.length(); i++)\r
+ for (int i = 0; i < sequence.length(); i++)\r
{\r
try\r
{\r
- if (i < seq.length())\r
+ if (i < sequence.length())\r
{\r
- int pos = index.indexOf(seq.substring(i, i + 1));\r
+ int pos = index.indexOf(sequence.charAt(i));\r
\r
- if (!index.substring(pos, pos + 1).equals("_"))\r
+ if (index.charAt(pos)!='_')\r
{\r
check += ( ( (i % 57) + 1) * pos);\r
}\r