Length

Not available in this language yet.
Length( value )
Length( value )
Length( value )
Not available in this language yet.
Length( value )

Description

The length function returns the number of characters in the string.

Although we mention characters, technically, we are talking about code points. In Unicode, a code point is usually but not always a character. Code points can sometimes represent single characters, but can also represent formatting and other non-alphanumeric characters.

For example, the character é can be the single character "e" that includes an acute accent (U+00E9), or it could be displayed as a single character but be composed of an "e" (U+0065) and a "combining" acute accent (U+0301). Visually, you cannot distinguish between the two.

Parameters

Argument Type Definition and Requirements

value

String

The string for which to determine the length in characters.

Returns

An integer value which is the number of characters in the string.

Examples

Not available in this language yet.
Not available in this language yet.
System.out.println(
  client.query(
    Arr(
       Length("fire"),
       Length("fire and fireman"),
       Length("")
    )
  ).get());
[4, 16, 0] 
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!