Check out v4 of the Fauna CLI

v4 of the Fauna CLI is now in beta.

The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start.

string.at()

Get the character at a specified index of a String.

Signature

at(index: Number) => String

Description

Returns the UTF-16 character located at a zero-based offset index. The calling String isn’t changed.

Parameters

Parameter Type Required Description

index

Int

true

Zero-based index of the character to return. Must be less than the String's length.

Return value

Type Description

String

Character located at the specified index.

Examples

Return the character at index offset 9:

"HTTP/1.1 200 OK".at(9)
"2"

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!