Project

General

Profile

$addtokcs » History » Revision 3

Revision 2 (Per Amundsen, 02/07/2014 08:50 PM) → Revision 3/10 (Per Amundsen, 02/17/2014 09:14 AM)

h1. $addtokcs 

 _Added in 1.9.0_ 

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

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

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

 *Parameters* 

 text - Text to add the token to. <pre> 
 token - Token to add. //echo -ag $addtokcs(a.b.c,D,46) returns a.b.c.D 
 //echo -ag $addtokcs(a.b.c.d,c,46) returns a.b.c.d 
 </pre> 

 The C - Ascii parameter is the 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 $addtokcs(a.b.c,D,46) 

 ;Returns a.b.c.d 
 //echo -ag $addtokcs(a.b.c.d,c,46) 
 </pre> 
 $addtok is case-sensitive, see [[$addtok]] for case-insensitive version.