Panex v0.1.0 Panex.String
String utilities
Link to this section Summary
Functions
Return camel-case from a given string
Return kebab-case from a given string
Get index of a substring from a pattern
Link to this section Functions
Return camel-case from a given string.
Examples
iex> camel_case("ha noi")
"haNoi"
iex> camel_case("Ha noi")
"haNoi"
iex> camel_case("ha-noi")
"haNoi"
Return kebab-case from a given string.
Examples
iex> kebab_case("ha noi")
"ha-noi"
iex> kebab_case("Panex Utilities")
"panex-utilities"
Link to this function
substring_index(pattern, substring)
Get index of a substring from a pattern.
Examples
iex> substring_index("abcdef", "cde")
2
iex> substring_index("{% sections 'header' %}", "{% endschema %}")
nil