Returns the length of a character string.
$length(string)
string | a character string or an expression that evaluates to a character string |
Number.
If string is a complex arithmetic expression, then the result of $length(string) is always 17. Arithmetic expressions are evaluated using the data type vastint so that the largest possible number can always be handled. When converted to a string, a vastint value occupies 17 positions, regardless of its numeric value.
$length("abcdefgh")
Evaluates to 8.
$length(5*3)
Evaluates to 17.