Inflex v1.8.0 Inflex
Summary
Functions
Camelizes or pascalizes strings and atoms
See Inflex.Camelize.camelize/2
Inflect on the plurality of a word given some count
Converts an integer to a ordinal value
Parameterize a string given some separator
See Inflex.Parameterize.parameterize/2
Pluralize a word
Singularize a word
Underscore and lowercase a string
Functions
Camelizes or pascalizes strings and atoms.
Examples
iex> Inflex.camelize(:upper_camel_case)
"UpperCamelCase"
iex> Inflex.camelize("pascal-case", :lower)
"pascalCase"
Inflect on the plurality of a word given some count.
Examples
iex> Inflex.inflect("child", 1)
"child"
iex> Inflex.inflect("child", 2)
"children"
Converts an integer to a ordinal value.
Examples
iex> Inflex.ordinalize(1)
"1st"
iex> Inflex.ordinalize(11)
"11th"
Parameterize a string given some separator.
Examples
iex> Inflex.parameterize("String for parameter")
"string-for-parameter"
iex> Inflex.parameterize("String with underscore", "_")
"string_with_underscore"
Pluralize a word.
Examples
iex> Inflex.pluralize("dog")
"dogs"
iex> Inflex.pluralize("person")
"people"