$$length
Returns the length of a value
Usage​
"$$length([type],[default_zero]):{input}"
Returns​
integer
Arguments​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
Primary | string /array /object | Yes | Value to check length of | |
type | Enum | AUTO /STRING /ARRAY /OBJECT | AUTO | Restrict the type of value to check length of (if specified type not detected the result will be null ) |
default_zero | boolean | true /false | false | Whether to return 0 instead of null (on any kind of issue) |
Examples​
Input
Definition
Output
"hello world"
"$$length:$"
11
"hello world"
"$$length(STRING):$"
11
["a","b","c"]
"$$length:$"
3
{
"a": 1,
"b": 2,
"c": 3,
"d": 4
}
"$$length:$"
4
{
"a": 1,
"b": 2,
"c": 3,
"d": 4
}
"$$length(STRING):$"
null
[1,2,3]
"$$length(STRING,true):$"
0