码迷,mamicode.com
首页 > 其他好文 > 详细

查找 字符 索引

时间:2019-09-07 01:15:30      阅读:61      评论:0      收藏:0      [点我收藏+]

标签:字符串   std   span   ret   pre   ons   http   索引   code   

 

#include <stdio.h>
#include <string.h>

int main ()
{
   const char str[] = "http://www.runoob.com";
   const char ch = .;
   char *ret;

   ret = strchr(str, ch);

   printf("|%c| 之后的字符串是 - |%s|\n", ch, ret);
   
   return(0);
}

 

查找 字符 索引

标签:字符串   std   span   ret   pre   ons   http   索引   code   

原文地址:https://www.cnblogs.com/sea-stream/p/11478879.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!