![]() |
tokenize3
there should be a tokenize3 command that tokenizes without tokenizing with spaces.
ie: tokenize3 |,bob|went to the|market; token1=bob token2=went to the token3=market |
Er, future improvements?
But it sounds good. |
WTF?? i dont understand
|
oh now i do sorry for being a retard:D
|
you could just have the string be like "bob" "went to" "the market"
0 - bob 1 - went to 2 - the market |
Except tokenize "bob" "went to" "the market" returns
"bob" "went to" "the market" is his point |
Quote:
|
Quote:
|
eek
i have this script if (actionserverside) { with (getplayer(#p(0))) { setstring client.test,#p(1); } } //#CLIENTSIDE if (playerchats && startswith(-,#c)) { triggeractoin 0,0,serverside,test,"#a,#e(1,-1,#c)"; } then when i parse the string, it messes up if you have a " within your message Xx i dont know why i posted that Xx i would like to see tokenize3 |
Anything within " & " Is a token so:
Bob "went to the" market tokens being 1-bob 2-went to the 3-market |
why not use tokenize2?
tokenize2 delims,str; - divides str into tokens, using 'delims' as additional delimiters example: tokenize2 $,Bob$went to the$market; that will return a token for each one :) #t(0) = Bob #t(1) = went to the #t(2) = market Why add tokenize3 that does the samething as tokenize2? Delims, as indicated from the commands.rtf is the delimiter you want the command to use to seperate each word in the string. If you make delims blank then yes, each space in str will be the cutoff point each time it occurs. |
Quote:
would come out 0: Bob 1: went 2: to 3: the 4: market Tokenize 3 might be useful...but you can easily get around the spaces with quotes....i use them all the time, for things like the on screen radio, it used wraptext, everything was just quoted though. It should work fine. |
Quote:
divides str into tokens, using 'delims' as additional `delimiters |
Quote:
|
Quote:
I just fail to see the reason to duplicate an existing command. If it fails to work properly, then post it in the bugs forum :p Maybe Stefan will go back and make sure it works for the next release :) |
| All times are GMT +2. The time now is 11:01 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.