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.”