Actions
$deltok » History » Revision 2
« Previous |
Revision 2/3
(diff)
| Next »
Per Amundsen, 02/25/2017 04:07 PM
Added in 1.9.0
$deltok(text,N-N2,C)
Deletes the Nth token from text.
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.
N-N2 - The range of tokens or Nth token to delete.
C - The ASCII value to tokenize by.
Example
; Delete the 3rd token, result is 'a.b.d' //echo -ag $deltok(a.b.c.d,3,46) ; Delete the second to third token, result is 'a.d' //echo -ag $deltok(a.b.c.d,2-3,46) ; Delete all tokens from the second to end. //echo -ag $deltok(a.b.c.d,2-,46)
Updated by Per Amundsen almost 8 years ago · 2 revisions