Pop3mail.StringUtils (pop3mail v1.5.2)

View Source

String manipulation utilities.

Summary

Functions

true if search is found in content

test if string is nil or has empty length

Print text if it valid utf-8 encoded. If not, print the alternative text.

Strip a character. Only when it occurs both at the start and end if the text. Strip once only.

Strip double quotes. Only when they occur at the start and end if the text. Strip balanced. Once only.

Functions

contains?(content, search)

@spec contains?(String.t() | nil, String.t()) :: boolean()

true if search is found in content

is_empty?(str)

@spec is_empty?(String.t() | nil) :: boolean()

test if string is nil or has empty length

printable(str, printable_alternative \\ "")

@spec printable(binary(), String.t()) :: String.t()

Print text if it valid utf-8 encoded. If not, print the alternative text.

remove_balanced(text, remove)

@spec remove_balanced(String.t(), String.t()) :: String.t()

Strip a character. Only when it occurs both at the start and end if the text. Strip once only.

unquoted(text)

@spec unquoted(String.t()) :: String.t()

Strip double quotes. Only when they occur at the start and end if the text. Strip balanced. Once only.