Mau.Filters.String (mau v0.8.0)

View Source

String manipulation filters.

Summary

Functions

Capitalizes the first letter of each word in a string.

Returns a default value if the input is nil or empty string.

Converts a string to lowercase.

Returns the filter specification for this module.

Removes leading and trailing whitespace.

Truncates a string to the specified length.

Converts a string to uppercase.

Functions

capitalize(value, args)

Capitalizes the first letter of each word in a string.

default(value, args)

Returns a default value if the input is nil or empty string.

lower_case(value, args)

Converts a string to lowercase.

spec()

Returns the filter specification for this module.

strip(value, args)

Removes leading and trailing whitespace.

truncate(value, arg2)

@spec truncate(String.t(), list()) :: {:ok, String.t()} | {:error, String.t()}

Truncates a string to the specified length.

upper_case(value, args)

Converts a string to uppercase.