Arthur Fuller
fuller.artful at gmail.com
Sat Mar 22 16:41:26 CDT 2008
Forgive me, el maestro de los classes, but I would have thought this a no-brainer for you. Write a class with some methods that walk the string accordingly, like Next and Previous (should you need that one) and so on. Encapsulate the mechanics of SubStr() and you're there. No? And here I deemed you a godlike being regarding classes! Turns out you bleed just like the rest of us. Go figure. I can already see this class, thanks to your teachings, and those also of Shamil. Init walks the string, the other guys deal with the resultant array. Granted, Split() looks for a delimiter, which in this case we do not have, but we can walk the string instead, no? After that, it's cheesecake. A. On 3/22/08, jwcolby <jwcolby at colbyconsulting.com> wrote: > > How can I turn a string into an array? I need to iterate through the > characters of a string. > > For each char in str > dosomething char > Next char > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > >