Strings#
A reference document listing built-in convenience functions to support data transformation in expressions for strings.
JavaScript in expressions
You can use any JavaScript in expressions. Refer to Expressions for more information.
extractDomain(): String #
Extracts a domain from a string containing a valid URL. Returns undefined if none is found.
extractEmail(): String #
Extracts an email from a string. Returns undefined if none is found.
extractUrl(): String #
Extracts a URL from a string. Returns undefined if none is found.
hash(algo?: Algorithm): String #
Returns a string hashed with the given algorithm.
Function parameters#
algoOptionalString enum
Which hashing algorithm to use.
isDomain(): Boolean #
Checks if a string is a domain.
isEmail(): Boolean #
Checks if a string is an email.
isEmpty(): Boolean #
Checks if a string is empty.
isNotEmpty(): Boolean #
Checks if a string has content.
isNumeric(): Boolean #
Checks if a string only contains digits.
isUrl(): Boolean #
Checks if a string is a valid URL.
quote(mark?: String): String #
Returns a string wrapped in the quotation marks. Default quotation is
"
.
Function parameters#
markOptionalString
Which quote mark style to use.
removeMarkdown(): String #
Removes Markdown formatting from a string.
replaceSpecialChars(): String #
Replaces non-ASCII characters in a string with an ASCII representation.
removeTags(): String #
Remove tags, such as HTML or XML, from a string.
toDate(): Date #
Converts a string to a date.
toFloat(): Number #
Converts a string to a decimal number.
toInt(): Number #
Converts a string to an integer.
toSentenceCase(): String #
Formats a string to sentence case.
toSnakeCase(): String #
Formats a string to snake case.
toTitleCase(): String #
Formats a string to title case.
toWholeNumber(): Number #
Converts a string to a whole number.
urlDecode(entireString?: Boolean): String #
Decodes a URL-encoded string. It decodes any percent-encoded characters in the input string, and replaces them with their original characters.
Function parameters#
entireStringOptionalBoolean
Whether to decode characters that are part of the URI syntax (true) or not (false).
urlEncode(entireString?: Boolean): String #
Encodes a string to be used/included in a URL.
Function parameters#
entireStringOptionalBoolean
Whether to encode characters that are part of the URI syntax (true) or not (false).