String manipulation

String^ str = "abcd-123";

i want to get the string "123" from str. i can do that in std string using "...str.find_last_of("-")" method
but what if its a system string ? im thinking to convert it to std string then convert it back again to system string...but is there a way to do it with out converting the string ? is there a same method for System String ?

thanks
Last edited on
When you say "System String" I'm not sure what you mean. It is the plain c-string you refer to (that is, a null-terminated array of characters)?

If so, take a look at strtok, and indeed the other functions for manipulating c-strings, such as strrchr.
http://www.cplusplus.com/reference/clibrary/cstring/strtok/
http://www.cplusplus.com/reference/clibrary/cstring/
Last edited on
what if its a system string ?

That'd be some kind of .NET language, would it? Someone might know, but you'd have more luck asking in a .NET forum
Topic archived. No new replies allowed.