henchman v0.3.0 Henchman.String
Additional string functionalities.
Summary
Functions
Get the acronym from a string
Determine if string contains alphabets only
Determine if string contains alphabets and integers
Determine if string is blank
Convert string to camel case
Limit characters within a string
Determine if string contains lower case characters only
Determine if string contains integers only
Convert string to slug format
Convert string to snake case
Convert string to studly case
Capitalize the first letter in a string
Determine if string contains upper case characters only
Limit words within a string
Functions
Get the acronym from a string.
Example
iex> Henchman.String.acronym("foo bar") //"FB"
Determine if string contains alphabets only.
Example
iex> Henchman.String.alpha?("ABCdef")#true
Determine if string contains alphabets and integers.
Example
iex> Henchman.String.alphanumeric?("ABCdef123")#true
Determine if string is blank.
Example
iex> Henchman.String.blank?("")#true
Convert string to camel case.
Example
iex> Henchman.String.camel_case("foo-bar")#fooBar
Limit characters within a string.
Example
iex> Henchman.String.limit("Foo bar baz", 7)#Foo bar...
Determine if string contains lower case characters only.
Example
iex> Henchman.String.lowercased?("def")#true
Determine if string contains integers only.
Example
iex> Henchman.String.numeric?("123")#true
Convert string to slug format.
Example
iex>Henchman.String.slug("foo Bar")#foo-bar
Convert string to snake case.
Example
iex> Henchman.String.snake_case("FooBar")#foo_bar
Convert string to studly case.
Example
iex> Henchman.String.studly_case("foo-bar")#FooBar
Capitalize the first letter in a string.
Example
iex> Henchman.String.title_case("Foo bar-baz")#Foo Bar-baz
Determine if string contains upper case characters only.
Example
iex> Henchman.String.uppercased?("ABC")#true