substring
Extracts a portion of a string between a starting index and an optional ending index. Supports negative indices to slice from the end of the string.
Syntax
Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
| text | string |
The original source text. | Required |
| start | int |
The zero-based index to begin extraction. Supports negative values. | Required |
| end | int |
The zero-based index before which to end extraction. Supports negative values. | None (Slices to end) |