Project

General

Profile

$puttok » History » Revision 2

Revision 1 (Per Amundsen, 08/10/2015 05:50 AM) → Revision 2/3 (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":http://www.asciitable.com/ value to tokenize by. 

 *Example* 

 <pre> 
 ; Replace the second token with 'e'. '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) 
 </pre>