sshrum Posted June 8, 2007 Share Posted June 8, 2007 I'm trying to split a string like: 'Calloway, Cab' At the ', ' (that's comma+space) So I'm doing this: $aTemp = StringSplit($sArtist, ", ") I figured I'd get back a 2 element array with $aTemp[1] = 'Calloway' $aTemp[2] = 'Cab' But instead I get: $aTemp[1] = 'Calloway' $aTemp[2] = '' $aTemp[2] = 'Cab' Seems like a bug to me. Am I wrong? Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
randallc Posted June 8, 2007 Share Posted June 8, 2007 Hi, needs flag; see Helpfile; ;splittry.au3 $sArtist='Calloway, Cab' $aTemp = StringSplit($sArtist, ", ",1) MsgBox(0,"",$aTemp[1]&@LF&$aTemp[2])Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
sshrum Posted June 8, 2007 Author Share Posted June 8, 2007 That's the stuff...Thanks Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' 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