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

C库函数 memchr()

#include <stdio.h>

#include <string.h>



int main () {

   const char str[] = "http://www.codingdict.com";

   const char ch = '.';

   char *ret;



   ret = memchr(str, ch, strlen(str));

   printf("String after |%c| is - |%s|\n", ch, ret);



   return(0);

}

目录

分类