tglogo.png
0 LIKES

Snippet


$septok

In Category General IRC Posted by guest On 07/10/11
Tags: n/a

Separates a string of text with the given character
The C parameter is the ascii value of the character separating the tokens
Examples:
/septok <text> <C>
/septok abcdefghijklmnopqrstuvwxyz 32
//echo -a $septok(text,C)
//echo -a $septok(abcdefghijklmnopqrstuvwxyz,32)

alias septok {
  var %1 1
  while (%1 <= $len($$1)) {
    var %2 $instok(%2,$right($left($$1,%1),1),%1,$$2)
    inc %1
  }
  if (%2) $iif($isid,return %2,echo -a %2)
}


Comments 1

err0r - Monday, 11 July, 2011
nice one

Please note that on our website we use cookies necessary for the functioning of our website, cookies that optimize the performance. To learn more about our cookies, how we use them and their benefits, please read our Cookie Policy.
I Understand