Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.02 KB

README.md

File metadata and controls

35 lines (24 loc) · 1.02 KB

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"}