ExDash v0.3.1 Exdash.String
Summary
Functions
Converts str
to camel case
Converts the first character of string to down case
Converts str
to kebab case
Converts str
to snake case
Convers the first charachter of string to upper case
Split str
into words using pattern
Functions
Converts str
to camel case
Examples
iex> Exdash.String.camel_case("camel case")
"camelCase"
iex> Exdash.String.camel_case("CAMEL CASE")
"CAMELCase"
iex> Exdash.String.camel_case("__camel__case__")
"camelCase"
Converts the first character of string to down case.
Examples
iex> Exdash.String.downcase_first("HELLO WORLD")
"hELLO WORLD"
Converts str
to kebab case
Examples
iex> Exdash.String.kebab_case("kebab case")
"kebab-case"
iex> Exdash.String.kebab_case("kebab_case")
"kebab-case"
iex> Exdash.String.kebab_case("Kebab-Case")
"kebab-case"
Converts str
to snake case
Examples
iex> Exdash.String.snake_case("foo bar")
"foo_bar"
iex> Exdash.String.snake_case("__FOO__BAR__")
"foo_bar"
Convers the first charachter of string to upper case.
Examples
iex> Exdash.String.upcase_first("hello world")
"Hello world"