strstr用法
来源:互联网 发布:客户端mac 编辑:程序博客网 时间:2024/05/17 23:15
语法:#include <string.h>char *strstr(char *s1, char *s2);
作用:在s1中查找s2子串
返回s2在s1中第一次出现的地址,如果没找到则返回NULL。
匹配过程不包括NULL字符。
例子:#include <stdio.h>#include <string.h>int main (){ char str[] ="This is a simple string"; char *pch; pch = strstr(str, "simple"); strncpy(pch, "sample", 5); puts(str); return 0;}输出结果:This is a sample string
0 0
- strstr用法
- strstr与strchar用法
- strstr与strchar用法
- strstr定义及用法
- 关于strstr的用法
- strstr函数的用法
- strstr函数的用法
- substr(),strstr()函数用法
- strstr函数用法小结
- strstr函数的用法
- strstr的用法
- strstr的用法
- strstr的用法
- strstr函数的用法
- strstr的用法
- strstr函数的用法
- strchr和strstr的用法
- strstr与strchar用法(查找字符串)
- 他们把一个人们难以忍受的工具
- django框架使用postgresql数据库
- 四 :ios学习笔记 数组及时间类处理
- tomcat启动问题
- JSTL的一些表达式
- strstr用法
- 归并排序
- 内部类中引用的变量必须要声明为final的原因
- node 重定向
- Log4J2的配置与使用
- 关于IE所有浏览器文字不能显示的解决步骤
- Delta3D 自定义扩展actors 是怎样最终创建的
- 工作一年总结
- postgresql学习笔记