Skip to main content

[]

Symbol of string.

Overloads​

NameDescription
(string lhs [] integer index) -> stringAccesses an element at the specified index.
(const string lhs [] integer index) -> stringAccesses an element at the specified index.
(const string lhs [] const Slice slice) -> stringAccesses characters using slice notation (Python-style).
(const string lhs [] const Slices slices) -> stringAccesses characters using slice notation (Python-style).

(string lhs [] integer index) -> string​

Accesses an element at the specified index.

Parameters​

  • lhs: Left-hand side value.
  • index: The index of the element to access. Negative indices count from the end.

(const string lhs [] integer index) -> string​

Accesses an element at the specified index.

Parameters​

  • lhs: Left-hand side value.
  • index: The index of the element to access. Negative indices count from the end.

(const string lhs [] const Slice slice) -> string​

Accesses characters using slice notation (Python-style).

Parameters​

  • lhs: Left-hand side value.
  • slice: The slice parameters specifying start, end, and step.

(const string lhs [] const Slices slices) -> string​

Accesses characters using slice notation (Python-style).

Parameters​

  • lhs: Left-hand side value.
  • slices: The slice parameters specifying start, end, and step.