HumanName
Elixir bindings for the human-name crate implemented as a safe Rust NIF.
Installation
Be sure to install Rust.
This package can be installed by adding human_name
to your list of dependencies in mix.exs
:
def deps do
[
{:human_name, "~> 0.1.0"}
]
end
Usage
iex> HumanName.first_name("Dr. Alibaster Cornelius Juniper III")
{:ok, "Alibaster"}
iex> HumanName.initials("Dr. Alibaster Cornelius Juniper III")
{:ok, "AJ"}
iex> HumanName.last_name("Dr. Alibaster Cornelius Juniper III")
{:ok, "Juniper"}
iex> HumanName.normalize("Dr. Alibaster Cornelius Juniper III")
{:ok, "Alibaster Juniper"}
iex> HumanName.normalize_full("JIMMY H JENKINS")
{:ok, "Jimmy H. Jenkins"}
License
MIT License
See the license file for details.