
08-13-2001, 03:58 AM
|
|
Registered User
|
 |
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
|
|
|
Say you have 2 strings:
setstring this.teststring,This is a test;
setstring this.teststring2,This is "a test";
Now, lets tokenize the first one:
tokenize #s(this.teststring);
This is what it returns:
#t(0) - This
#t(1) - is
#t(2) - a
#t(3) - test
Now, lets tokenize the second string:
tokenize #s(this.teststring2);
This is what it returns:
#t(0) - This
#t(1) - is
#t(2) - a test
As you can see, putting parenthesis around something tells tokenize to count everything inside the parenthesis as 1 token.
As for tokenize2, it will tokenize via space's AND the delimeters, so:
setstring this.teststring3,My computer's name is Samson;
tokenize2 s,#s(this.teststring3);
This is what it returns:
#t(0) - My
#t(1) - computer'
#t(2) - name
#t(3) - i
#t(4) - am
#t(5) - on
Hope that helps |
__________________
-Boco
FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
|
|
|
|