Actions
$puttok » History » Revision 2
« Previous |
Revision 2/3
(diff)
| Next »
Per Amundsen, 02/25/2017 04:07 PM
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
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 7 years ago · 2 revisions