If you want to do a lot of this stuff you probably ought to use the STL string class. It has lots of methods, like substr() if I remember right. I think you would find things much less confusing with the string class.
You can make your own functions to do it with a little thought. Char strings are just arrays of characters. They're not hard to deal with.
If you want to use char arrays, there are some functions, like strstr() that do the things you want. I don't know them all though, I'd probably just make my own.




Reply With Quote