NameCase (name_case v0.3.0) View Source
Link to this section Summary
Link to this section Functions
Returns a properly namecased name
.
Options
:lazy
- whether to skip mixed case names (defaults totrue
):mac_prefix
- whether to fix Mac/Mc prefix names (defaults totrue
):spanish
- whether to fix Spanish names (defaults totrue
):roman
- whether to fix roman numeral cases, eg. XI, XII (defaults totrue
):post_nominals
- whether to fix post-nominal letter cases, eg. OBE, PhD (defaults totrue
)
Examples
iex> NameCase.nc("MCDONALDS")
"McDonalds"
iex> NameCase.nc("LEIGH-WILLIAMS")
"Leigh-Williams"
iex> NameCase.nc("ST. jOhN", lazy: false)
"St. John"