The function
strstr[
^] can find a sub string in a string and return its location.
char szHaystack[] = "hello world";
char *szNeedle = strstr(szHaystack, "lo");
if (szNeedle == NULL) {
printf("The string \"lo\" was not found.\n");
} else {
printf("The string \"lo\" was found %u characters from the start.\n", szNeedle - szHaystack);
}