Actions
Added in 1.9.0
$puttok(text,token,N,C)
Overwrites the Nth token in text with a new token.
N-N2 can be used to get a range of tokens, both numbers can be negative.
N- can be used to get all tokens from position N.
Parameters
Parameter | Description |
text | The text to tokenize. |
token | Token to put. |
N | The Nth token to replace. |
C | The ASCII value to tokenize by. |
Example
; Replace the second token with 'e'. //echo -ag $puttok(a.b.c.d,e,2,46) ; Print the second to third token to 'e'. //echo -ag $puttok(a.b.c.d,e,2-3,46) ; Replace all tokens from position 2 to 'e'. //echo -ag $puttok(a.b.c.d,e,2-,46)
Updated by Per Amundsen over 1 year ago · 3 revisions