Arrrghmatey Posted July 18, 2005 Share Posted July 18, 2005 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 More sharing options...
blindwig Posted July 18, 2005 Share Posted July 18, 2005 StringSplit() returns a 1-based array My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
GaryFrost Posted July 18, 2005 Share Posted July 18, 2005 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 More sharing options...
Arrrghmatey Posted July 18, 2005 Author Share Posted July 18, 2005 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 :"> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now