private static String trimSpaceAtStart ( final String temp , final String termName ) { if ( termName != null && termName . charAt ( termName . length ( ) - 1 ) == ' ' ) { if ( temp . charAt ( 0 ) == ' ' ) { return temp . substring ( 1 ) ; } } return temp ; }
Trim whitespace from start of the string . If last character of termName and first character of temp is a space character remove leading string from temp