Sign in to follow this  
Followers 0
Arrrghmatey

String tokenizer?

4 posts in this topic

Is there a function similar to java's string tokenizer? I have a string "x,y" and want to quickly parse that into an array where a[0]=x and a[1]=y. I know I can do this pretty easily on my own but don't want to put the time in if there is an easier way.

Share this post


Link to post
Share on other sites



Share this post


Link to post
Share on other sites

Try StringSplit

$array = StringSplit($string,",")

Note: $array[0] holds the number of items

so:

for $i = 1 to $array[0]

MsgBox(0,"test",$array[$i])

next

Gary


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Ah, thank you! That's exactly what I needed. I spelled 'delimiter' wrong when doing a search, so that's whay I didn't see it :">

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0