public static String trimLeadingWhitespace(String str){
  if (!hasLength(str)) {
    return str;
  }
  StringBuilder buf=new StringBuilder(str);
  while (buf.length() > 0 && Character.isWhitespace(buf.charAt(0))) {
    buf.deleteCharAt(0);
  }
  return buf.toString();
}

public static String trimLeadingWhitespace ( String str ) { if ( ! hasLength ( str ) ) { return str ; } StringBuilder buf = new StringBuilder ( str ) ; while ( buf . length ( ) > 0 && Character . isWhitespace ( buf . charAt ( 0 ) ) ) { buf . deleteCharAt ( 0 ) ; } return buf . toString ( ) ; }
trim leading whitespace from the given string .
