Skip to content

@str.at

Access a character by index in a string.

Returns: string

@str.at(value index)
Name Type Description
value string Input value
index number Zero-based character index
# Get the first character
set $s "hello"
set $c @str.at($s 0)
# Get the last character (negative index)
set $s "hello"
set $l @str.at($s -1)
  • @str.slice — extract a substring
  • @at — array element access