Skip to content

MMore/full_name_splitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FullNameSplitter

CI Hex

Full Name Splitter is a library to split a full name simply into first and last name.

It was inspired by the JavaScript port. But it uses a tokenizer built with Erlang leex and a parser built with Erlang yecc.

Installation

Add full_name_splitter to your list of dependencies in mix.exs:

def deps do
  [
    {:full_name_splitter, "~> 1.0.0"}
  ]
end

Usage

FullNameSplitter.split("Leonardo da Vinci")
{"Leonardo", "da Vinci"}

FullNameSplitter.split("Johan de heer Van Kampen")
{"Johan", "de heer Van Kampen"}

FullNameSplitter.split("Anthony R Von Fange III")
{"Anthony R", "Von Fange III"}