The Fauna service will be ending on May 30, 2025.

For more information on the service wind down, see our announcement and the Fauna Service End-of-Life FAQ.

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"
\