Next: , Up: Text handling   [Contents][Index]


11.1 Calculating length of strings

The length of a string can be calculated by len:

Builtin: len (string)

Expands to the length of string, as a decimal number.

The macro len is recognized only with parameters.

len()
⇒0
len(`abcdef')
⇒6