Guide
Name Parsing
Wordsmith provides several helpful methods for working with names.
The parseName() function parses a string as a name and returns an array of name parts — e.g. first name, last name, etc.
Several shortcut filters are also available if you only need to extract one specific part.
Wordsmith’s name parsing methods include:
Name parsing methods
firstName
An alias for givenName.
givenName
Parses a string as a name and returns the ‘given name’ component.
| {{ 'Michael Rog' | givenName }} | 
lastName
An alias for surname.
parseName
Parses a string as a name and returns a hash of its components:
| {% parseName('Mr. Erich O. H. C. M. "The First Auteur" von Stroheim, II') %} | 
surname
Parses a string as a name and returns the ‘family name’ component.
| {{ 'Michael Rog' | surname }} | 
      Caught a mistake or want to contribute to the documentation?
      
        Submit a PR via Github
      
      or
      email Support.
    
