code: public char skipTo(char to) {
          int index = in.indexOf(to, pos);
          if (index != -1) {
              pos = index;
              return to;
          } else {
              return '\0';
          }
      }
docs: Advances past all input up to but not including the next occurrence of
  {@code to}. If the remaining input doesn't contain {@code to}, the input
  is unchanged.