STRING_LENGTH macro
The STRING_LENGTH
macro
is available only in Unica Campaign.
Syntax
STRING_LENGTH(data)
Parameters
data
ASCII
text string values to compute the length of. This can be ASCII text
in quotes, a column of text, a cell range containing text, or an expression
evaluating to any of the above. For the format definition of data
,
see the "Macro Function Parameters" section in the chapter
in this guide for your product.
Description
STRING_LENGTH
returns the length of each string value in the specified data range.
It returns one new column for each input column, each containing the
length of the corresponding text string.
STRING_LENGTH
is applied to columns containing numerical data, it returns zeros.Examples
TEMP = STRING_LENGTH("four")
Creates a new column named |
TEMP = STRING_LENGTH(4)
Creates a new column named |
TEMP = STRING_LENGTH(V1)
Creates a new column named |
TEMP = STRING_LENGTH(V1:V3)
Creates three new columns named |
TEMP = STRING_LENGTH(V4[1:50]:V6]
Creates three new columns named |
Related functions
Function | Description |
---|---|
STRING_CONCAT |
Concatenates two text strings from the specified data ranges |
STRING_HEAD |
Returns the first n characters of each string in the specified data range |
STRING_SEG |
Returns the string segment between two specified indexes |
STRING_TAIL |
Returns the last n characters of each string in the specified data range |