strstr函数
来源:互联网 发布:领导风格测试软件 编辑:程序博客网 时间:2024/05/17 05:05
函数名: strstr
功 能: 在字符串中查找指定字符串的第一次出现
用 法: char *strstr(char *str1, char *str2);
用法:#include <string.h>
功能:
语法:* strstr(str1,str2)
str1: 被查找目标 string expression to search.
str2:要查找对象 The string expression to find.
该函数返回str2第一次在str1中的位置,如果没有找到,返回NULL
功 能: 在字符串中查找指定字符串的第一次出现
用 法: char *strstr(char *str1, char *str2);
用法:#include <string.h>
功能:
str1: 被查找目标 string expression to search.
str2:要查找对象 The string expression to find.
该函数返回str2第一次在str1中的位置的指针,如果没有找到,返回NULL
#include <syslib.h>
#include <string.h>
main()
{
char *s="Golden Global View";
char *l="lob";
char *p;
clrscr();
p=strstr(s,l);
if(p)
printf("%s",p);
else
printf("Not Found!");
getchar();
return 0;
}
输出:lobal View
语法:* strstr(str1,str2)
str1: 被查找目标 string expression to search.
str2:要查找对象 The string expression to find.
该函数返回str2第一次在str1中的位置,如果没有找到,返回NULL
- strstr函数
- strstr()函数
- strstr() 函数
- strstr函数
- strstr函数
- strstr函数
- strstr 函数
- strstr函数
- strstr函数
- strstr() 函数
- strstr函数
- strstr函数
- strstr 函数
- strstr函数
- strstr函数
- 函数strstr()
- strstr函数
- strstr函数
- C++ Socket编程步骤
- SQL Server 2008 定时作业的制定
- ECSide基于数据库的分页、排序、过滤的实现
- c#下实现ping操作
- Unity3D一个简单的动画混合Demo
- strstr函数
- 【转】使用JPA的EntityManager.persist()方法无法保存到数据库的问题
- java web总结
- 枚举及为什么要用1,2,4,8这些2的n次幂来表示枚举的值
- DataSet,DataTable,List实现将Sql Server表中的数据绑定到GradView中
- Power Socket程序设计
- html5学习之多媒体播放
- Android驱动开发之earlysuspend睡眠模式--实现代码
- make版本降到3.81