get length
This block is part of the value group and was last modified in core v10.4.28.
get length v10.4.28 value contains the length of the string in UTF-16 code units
In pins 1
- value required
value
Out pins 1
- Length
number
Outputs the UTF-16 code-unit count for strings (JS .length semantics: an emoji above U+FFFF counts as 2), the element count for arrays, and nil when the input is nil. Any other input is coerced to its JS string form first and that string's length is returned. NOT a byte or code-point count.
A typical wiring for get length: trim feeds the value pin; the number out pin feeds >.

Commonly used with
In production blueprints, this block is most often wired together with:
- get fields: feeds into this block. Gets the selected fields from the given object.
- >: this block feeds into it. returns true if the number is higher.
- ===: this block feeds into it. returns true if the two values are equal. Compares any type: numbers by value across int/float, strings and booleans strictly, objects and arrays deeply. There is no string/number coercion, so "1" does not equal 1.
- >=: this block feeds into it. returns true if the number is higher or equal.
- <=: this block feeds into it. returns true if the number is lower or equal.
- trim: feeds into this block. Removes characters from both ends of a string.
Version history
Introduced in v10.4.28.
Back to
value Return to the main group to view all sub-groups Back to value Return to the group to view all blocks within this group
