public String trimLeading ( String str ) { if ( str == null ) { return null ; } int length = str . length ( ) ; for ( int i = 0 ; i < length ; i ++ ) { if ( str . charAt ( i ) > ' ' ) { return str . substring ( i ) ; } } return "" ; }
Trims all leading whitespace characters from the given string .