橘子味的心
标题:C库函数 strstr()

C库函数 strstr()

#include <stdio.h>

#include <string.h>



int main () {

   const char haystack[20] = "CodingDict";

   const char needle[10] = "Point";

   char *ret;



   ret = strstr(haystack, needle);



   printf("The substring is: %s\n", ret);



   return(0);

}

目录

分类