$deltok » History » Version 2
Per Amundsen, 02/25/2017 04:07 PM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | *$deltok(text,N-N2,C)* |
||
4 | |||
5 | Deletes the Nth token from text. |
||
6 | |||
7 | 2 | Per Amundsen | _N-N2 can be used to get a range of tokens, both numbers can be negative._ |
8 | _N- can be used to get all tokens from position N._ |
||
9 | |||
10 | 1 | Per Amundsen | *Parameters* |
11 | |||
12 | text - The text to tokenize. |
||
13 | N-N2 - The range of tokens or Nth token to delete. |
||
14 | C - The "ASCII":http://www.asciitable.com/ value to tokenize by. |
||
15 | |||
16 | *Example* |
||
17 | |||
18 | <pre> |
||
19 | ; Delete the 3rd token, result is 'a.b.d' |
||
20 | //echo -ag $deltok(a.b.c.d,3,46) |
||
21 | |||
22 | ; Delete the second to third token, result is 'a.d' |
||
23 | 2 | Per Amundsen | //echo -ag $deltok(a.b.c.d,2-3,46) |
24 | |||
25 | ; Delete all tokens from the second to end. |
||
26 | //echo -ag $deltok(a.b.c.d,2-,46) |
||
27 | 1 | Per Amundsen | </pre> |