substrings

To check if a string is a sub string of a string , i use a for loop and check every character.
i was wondering if theres a function to check if a string is a substring of another one, any idea?


check http://www.cplusplus.com/reference/string/string/?kw=string methods.

You could use string::find ( http://www.cplusplus.com/reference/string/string/find/ ), or maybe there is already ready function for what you seek.
Last edited on
Topic archived. No new replies allowed.