Click to See Complete Forum and Search --> : [Q]: String parsing


jeremy
January 22nd, 1999, 06:38 PM
Hello,

I have to port an app i wrote with MFC to VB. I used strtok (or whatever it is) to tokenize the command line i had to parse. It worked beautifuly. However VB lacks good string manipulating functions as I have seen. Is there anything in VB that can tokenize a string as like in C? Any code anywhere that does this?


thanx,

jeremy

Jeremy-Deleted
January 22nd, 1999, 06:38 PM
Hello,

I have to port an app i wrote with MFC to VB. I used strtok (or whatever it is) to tokenize the command line i had to parse. It worked beautifuly. However VB lacks good string manipulating functions as I have seen. Is there anything in VB that can tokenize a string as like in C? Any code anywhere that does this?


thanx,

jeremy

Chris Eastwood
January 22nd, 1999, 07:49 PM
Hi


Back in the Days when I did use C, I never used the 'strtok' function (we always did it the hard way (i.e. someone had wrapped it in their own routine). I did however find a routine at http://www.planet-source-code.com/vb that may help:


Either go to http://www.planet-source-code.com/vb and do a search for strtok (returns 2 results) or look at


http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=850


for a direct conversion of strtok.


Hope it helps


Regards


Chris Eastwood

Software Engineer

ACNielsen Ltd


CodeGuru - the website for developers

http://www.codeguru.com