LEN
- LEN(value)[source]
Returns the length of a string or the number of digits in a numeric value.
For strings: returns the number of characters.
For numbers: returns the number of digits in the integer representation.
For arrays: returns an array of lengths for each element.
- Parameters:
- Return type:
- Returns:
A formula representing the length(s) of the input value(s).
- Raises:
ValueError – If the input value’s data type is not one of the supported types.
Examples
Single string:
LEN("Hello") # Returns 5
Single number:
LEN(12345) # Returns 5
Array of strings:
LEN(["Hi", "Test", "A"]) # Returns [2, 4, 1]
Array of numbers:
LEN([12, 345, 6]) # Returns [2, 3, 1]
``value`` — accepted types
DECIMAL
DECIMAL_ARRAY
INTEGER
INTEGER_ARRAY
STRING
STRING_ARRAY
Return types
INTEGER
INTEGER_ARRAY