I don't know of any built in functions that will do that but it's easy
enough to do on your own.
something like this:
...
static const char whitespace[] = " \t\n\r\b\f\v";
...
find_string(str1,str2)
{
char *cp;
for (cp = strtok(str1, whitespace); /* get first token */
cp != NULL; /* more left */
cp = strtok(NULL, whitespace) )/* get next */
if(cp==str2) return 1;
}
This should go through and pick out the first occurance of str2 in the
string str1.
--Joe
> Hi,
>
> Is there any function which search a sub-string in a string !?
>
> Example:
>
> String1 = "My name is Nuno" ;
> SubString = "name" ;
>
> function_I _would_like_to_have (String1, SubString) ;
>
> As "name" exist on String1 it should return something like: 1 or
> anything else ...
>
> Thanks.
>
> Best regards,
> Nuno Carvalho