Jump to content

String tokenizer?


Recommended Posts

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.

Link to comment
Share on other sites

Link to comment
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.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...