@ Nullable public String extractUsername ( String email ) { int indexAt = email . indexOf ( AT_SYMBOL ) ; if ( indexAt == - 1 ) { return null ; } return email . substring ( 0 , indexAt ) ; }
Extracts the username part from the email