Next: , Previous: , Up: Built-in functions   [Contents][Index]


7.2.3.35 $LEN: Length of string

$LEN(string)’ returns the length of string in bytes. If string is not surrounded by quotes, it is interpreted as if it were quoted (so it is not expanded if it is a macro). Thus, in the example

@m SS string
$LEN(SS)

the value returned is 2, not 5.

To expand the argument before taking the length, one can say something like

@m $XLEN(s) $LEN(s)