Project

General

Profile

$addtok » History » Revision 6

Revision 5 (Per Amundsen, 02/07/2014 08:50 PM) → Revision 6/15 (Per Amundsen, 02/17/2014 09:12 AM)

h1. $addtok 

 _Added in 1.9.0_ 

 *$addtok(text,token,C)* $addtok(text,token,C) 

 Adds a token to the end of text but only if it is not already in text. 

 [[$addtok]] is case-insensitive, see [[$addtokcs]] for case-sensitive version. 

 *Parameters* 

 text - Text to add the token to. 
 token - Token to add. 
 C - Ascii value of the character separating the tokens. (You can use [[$chr]](C) to find the ascii value of a character) 

 *Example* 

 <pre> 
 ;Returns a.b.c.d 
 //echo -ag $addtok(a.b.c,d,46) 

 Returns returns a.b.c.d 
 //echo -ag $addtok(a.b.c.d,c,46) returns a.b.c.d 
 </pre> 
 

 The C parameter is the ascii value of the character separating the tokens. 

 $addtok is case-insensitive, see [[$addtokcs]] for case-sensitive version.