chunk
Split a string into two parts at the input index.
def chunk(
data: string,
index: integer
) - > tuple
Split a string into two parts at the input index.
Parameters
| Name | Type | Description |
|---|---|---|
| data | string | The source string to be partitioned into two segments |
| index | integer | The character position at which the string will be split |
Returns
| Type | Description |
|---|---|
tuple | A tuple containing the first part of the string up to the index and the second part from the index to the end |