String Functions in Fusion Flashcards
https://experienceleague.adobe.com/en/docs/workfront/using/adobe-workfront-fusion/functions-in-fusion/string-functions
What function removes all non-ascii characters from a text string?
ascii (text; [remove diacritics])
What function transforms text to base64?
base64 (text)
What function converts the first character in a text string to uppercase?
capitalize (text)
What function verifies whether text contains the search string?
contains (text; search string)
What function decodes special characters in a URL to text?
decodeURL (text)
What function encodes special characters in some text to a valid URL address?
encodeURL (text)
What function escapes all HTML tags in text?
escapeHTML (text)
What function escapes all Markdown tags in text?
escapeMarkdown(text)
What function returns the position of the first occurrence of a specified value in a string?
indexOf (string; value; [start])
*This method returns ‘-1’ if the value that is searched for is not there. The start value indicates where in the string the search should begin.
What function returns the length of text string (number of characters) or binary buffer (buffer size in bytes)?
length (text or buffer)
What function converts all alphabetical characters in a text string to lowercase?
lower (text)
What function calculates the md5 hash of a string?
md5 (text)
What function replaces the search string with the new string?
replace (text;search string; replacement string)
What special replacement patterns can be included in a replacement strong?
$& - Inserts the matched substring
$n - Where n is a positive integer less than 100, inserts the nth parenthesized submatch string. This is 1-indexed.
What function calculates the sha1 hash of a string?
sha1 (text; [encoding]; [key])
*If the key argument is specified, sha1 HMAC hash is returned instead. Supported encodings: “hex” (default), “base64” or “latin1.”
What function calculates the sha256 hash of a string?
sha256 (text; [encoding]; [key])
*If the key argument is specified, sha256 HMAC hash is returned instead. Supported encodings: “hex” (default), “base64” or “latin1”.>
What function calculates the sha512 hash of a string?
sha512 (text; [output encoding]; [key]; [key encoding])
*If the key argument is specified, sha512 HMAC hash is returned instead.
What function splits a string into an array of strings by separating the string into substrings?
split (text; separator)
What function capitalizes the first letter of every word and lower cases all other letters?
startcase (text)
What function removes all HTML tags from text?
stripHTML (text)
What function returns a portion of a text string between the “start” position and “end” position?
substring (text; start; end)
What function converts any value to binary data?
toBinary (value)
*You can also specify encoding as a second argument to apply binary conversions from hex or base64 to binary data.
What function converts any value to a string?
toString (value)
What function removes space characters at the start or end of the text?
trim (text)
What function converts all alphabetical characters in a text string to uppercase?
upper (text)