length (Text length)

The $length function determines the number of characters in a text.

Hint: The minusOne parameter controls whether 1 is subtracted from the result.

Syntax

$length(text[,minusOne])

Parameter

Name

Description

text

Any text

minusOne

The optional parameter whether the number 1 should be subtracted from the result.
e,g, $length(Hello,false) results in 5, $length(Hello,true) results in 4.

The default value is false.

Return value

The number of characters in the transferred text.

Example

Syntax

Result

$length(Hello World)

10

$length(Hello World,true)

9

$length($null)

0

$length()

0