DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
Returns the number of characters in a specified string or the number of elements in an array.
This helper is available in the Winter ’26 release of Marketing Cloud Next (API version 65.0).
1{{length subject}}| Parameter | Type | Description |
|---|---|---|
subject | String or Array | Required. The string or array to find the length of. |
The function returns the number of characters in the input string or the number of elements in the input array. If the input is null, it returns 0.
When measuring strings, the function counts all characters including spaces, punctuation, and special characters. Non-string inputs are converted to strings before counting. The function counts Unicode code units (UTF-16 length), so surrogate pairs count as 2 units.