The $length function determines the number of characters in a text.
Hint: The minusOne parameter controls whether 1 is subtracted from the result.
Tooltip
Syntax: $length(text[,minusOne=false])
Parameter
Description
textAny text
minusOne
(optional)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.
Returns the number of characters in the passed text.
Examples: $length(Hello world) – returns 10, $length(Hello world,true) – returns 9
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 |