src/main/java/SampleClient.java
// extracts first name from given name by removing middle name
extracts first name from given name by removing middle name
extracts first name from given name by removing middle name
private static String extractedFirstName(String givenName) {
        String newGiven = "";
        int len = givenName.length();
        for (int i = 0; i < len; ++i) {
            if (givenName.charAt(i) == '"') break; 
            newGiven += givenName.charAt(i);
        }
        return newGiven;
    }
private static String extractedFirstName ( String givenName ) { String newGiven = "" ; int len = givenName . length ( ) ; for ( int i = 0 ; i < len ; ++ i ) { if ( givenName . charAt ( i ) == '"' ) break ; newGiven += givenName . charAt ( i ) ; } return newGiven ; }
extracts first name from given name by removing middle name
extracts first name from given name by removing middle name
// stop extracting when we see the char ' " '