Monday, May 24, 2010

How can i manipulate string to know whether the substring is contained in the string?

how can i manipulate string in c++ to know whether the substring is contained or have a pattern in the string?


but,without using strcmp.

How can i manipulate string to know whether the substring is contained in the string?
Saw this yesterday...
Reply:in C/ C++ i would go for the library function strstr();


in JAVA, str.contains(str1) would do the trick, where str is the string in which str1 has to be searched

800flowers.com

No comments:

Post a Comment