viva.io.format

Undocumented in source.

Members

Functions

asNullIfEmpty
string asNullIfEmpty(string str)

Checks if a string is empty, and returns a null

envelop
string envelop(string side, string str)

Appends text to both sides of a given string

envelop
string envelop(string prefix, string str, string suffix)

Appends a prefix and suffix to a given string

formatStr
string formatStr(string str)

Formats a given string

prettify
string prettify(string str, string regex)

Prettifies a given string using regex

sanitize
string sanitize(string str, string target)

Sanitizes a given string

withAlternative
string withAlternative(string str, string alt)

Checks if a string is empty, and returns an alternative

Meta