char ch = string.charAt(i);
ch = string.charAt(i);
  public static long toLong(String string)  {    if (string.equals(""))      return 0;    int len = string.length();    long value = 0;    long sign = 1;    int i = 0;    if (string.charAt(0) == '-') {      sign = -1;      i = 1;    }    for (; i < len; i++) {      char ch = string.charAt(i);      if ('0' <= ch && ch <= '9')        value = 10 * value + ch - '0';      else        return sign * value;    }    return value;  }