Nth Character
nth_characterExtract the character at a given position in a text string using 1-based numbering. Optionally count from the end.
Instructions
Get the nth character (1-based, human-friendly numbering).
"What's the 3rd letter?" uses position=3.
Args:
text (string): The text to examine
position (number): Which character (1 = first, 2 = second, etc.)
from_end (boolean): Count from end instead (default: false)
Returns: The character and a human-readable description.
Example: nth_character("hello", 2) → 'e' (the 2nd character)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to examine | |
| from_end | No | Count from end instead | |
| position | Yes | Which character (1-based) |