About this snippet
Overview
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)
}