![]() |
Problem with String Matching
Hi,
Suppose I have one character array as A,B,B,B,A,A,B and another character array as A,B,A,A,A. Now using find () I can find the second string matches the first where the pattern starts at B,A,A. Suppose I dont know the pattern. Using find() I can only find the match location but how do I find the length of the pattern? It may be mentioned that I take the two strings as input from the key board and for the given example, the output should be: A B B B A A B A - - B A A A Any help much appreciated Thanks |
| All times are GMT +5.5. The time now is 22:43. |