public static int findNonwhitespaceCharacter(String s,int index){
  int sLength=s.length();
  while (index < sLength && Character.isWhitespace(s.charAt(index))) {
    index++;
  }
  return index;
}

public static int findNonwhitespaceCharacter ( String s , int index ) { int sLength = s . length ( ) ; while ( index < sLength && Character . isWhitespace ( s . charAt ( index ) ) ) { index ++ ; } return index ; }
finds the first non - whitespace character starting at index .
