Character At Index
char_atRetrieves the character at a given position in a string, using 0-based indexing with support for negative indices to count from the end.
Instructions
Get the character at a specific index (0-based). Supports negative indices.
Args:
text (string): The text to index into
index (number): Position (0-based, negative counts from end)
Returns: The character at that position, or error if out of bounds.
Example: char_at("hello", 1) → 'e'; char_at("hello", -1) → 'o'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to index into | |
| index | Yes | Position (0-based, negative from end) |