public String getLeftOf ( String srcStr , int charCount ) { String retValue = "" ; if ( isNotBlank ( srcStr ) ) { int length = srcStr . length ( ) ; if ( charCount < length ) { retValue = srcStr . substring ( 0 , charCount ) ; } else { retValue = srcStr ; } } return retValue ; }
Returns the number of characters specified from left