Summary
char
concat
indexOf
lowercase
properCase
regExMatch
replace
stringToHex
substring
trim
uppercase
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
Converts each character in a string to its hexadecimal equivalent.
This helper is available in the Winter ’27 release of Marketing Cloud Next.
1{{stringToHex sourceString [charSet=CHARSET]}}| Parameter | Type | Description |
|---|---|---|
sourceString | String | Required. The string to convert. |
charSet | String | The character set to use. Specify as a named parameter with a value of UTF-8 or UTF-16. The default is UTF-8. |
The function returns a hexadecimal string that represents the encoded characters in sourceString.
This example converts a string of text to its UTF-8 hexadecimal representation.
1{{stringToHex "Hello world!"}}The function returns:
148656c6c6f20776f726c6421This example converts the same string, but specifies UTF-16 encoding. Each character requires more bytes in UTF-16, so the resulting string is longer.
1{{stringToHex "Hello world!" charSet="UTF-16"}}The function returns:
1480065006c006c006f00200077006f0072006c0064002100