protected String extractFirstName ( String name ) { if ( StringUtils . isBlank ( name ) ) { return null ; } int lastIndexOf = name . lastIndexOf ( ' ' ) ; if ( lastIndexOf == - 1 ) return null ; else return name . substring ( 0 , lastIndexOf ) ; }
Extracts a first name of full name string