public char nextChar() { if (currentPos >= s.Length) return '\0'; char c = current; currentPos++; return c; }