the string contains substring or not
// C language example: check if string in another string in C #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> #include <stdbool.h> int main(int argc, char *argv[]) { char mystring[] = "Hi,lautturi world."; char findme[] = "lautturi"; if(strstr(mystring, findme) != NULL) { printf("The string '%s' was found in the string '%s' ",findme,mystring); } return 0; }