mayo v0.1.0 Mayo.String
Summary
Functions
Checks the length of a string
Checks the maximum length of a string
Checks the minimum length of a string
Functions
Checks the length of a string.
iex> Mayo.String.length("test", 4)
"test"
iex> Mayo.String.length("test", 5)
{:error, %Mayo.Error{type: "string.length"}}
Checks the maximum length of a string.
iex> Mayo.String.max("test", 5)
"test"
iex> Mayo.String.max("bucket", 5)
{:error, %Mayo.Error{type: "string.max"}}