public char skipTo(char to){
  char c;
  int index=this.myIndex;
  do {
    c=next();
    if (c == 0) {
      this.myIndex=index;
      return c;
    }
  }
 while (c != to);
  back();
  return c;
}

public char skipTo ( char to ) { char c ; int index = this . myIndex ; do { c = next ( ) ; if ( c == 0 ) { this . myIndex = index ; return c ; } } while ( c != to ) ; back ( ) ; return c ; }
skip characters until the next character is the requested character . if the requested character is not found , no characters are skipped .
