I am writing a program and I need to compare one string with a larger string in order to see if there is a match of characters anywhere in the string. For example, if I have a string with the value 'asdf', I need to be able to tell that it has a match WITHIN another string with the value of 'lasdf'. Think control-f, but with strings.
My question is: is there a method in c++ or Borland VCL to do this? I know I can do a comparison of char arrays and write my own code, but it would be nice to know if there is a method that can do this for me.
I would support the use of std::string as Galik suggested. But if you are definitely not using those and want to stick to char arrays, you can use strcmp(), stricmp() or its wide character equivalents if you are using wchar_t. Google them for examples and syntax.