static int parseDigit(char c) { ret c >= '0' && c <= '9' ? c-'0' : 0; } static int parseDigit(S s, int i) { ret parseDigit(s.charAt(i)); }