strset函数
来源:互联网 发布:决策树算法原理 编辑:程序博客网 时间:2024/06/03 18:09
函数原型:extern char *strset(char *str, char character)
参数说明:str为源字符串,即将要被操作的字符串,character为一个字符。
所在库名:#include <string.h>
函数功能:将字符串str中所有的字符都设置成为指定的字符character。
返回说明:返回所有字符都设置为character后的字符串的指针。
其它说明:暂时无。
实例:
#include <string.h>
#include <stdio.h>
int main()
...{
char str[100]="I'm sky2098,welcome to my website!";
char *strtemp;
strtemp=strset(str,'k'); //将字符串str中所有
字符替换为字符k
printf("The string strtemp is: %s ",strtemp);
return 0;
}
#include <stdio.h>
int main()
...{
char str[100]="I'm sky2098,welcome to my website!";
char *strtemp;
strtemp=strset(str,'k'); //将字符串str中所有
字符替换为字符k
printf("The string strtemp is: %s ",strtemp);
return 0;
}
在VC++ 6.0 编译运行:
设置成功。
- strset函数
- strset函数
- strset函数
- 字符串函数strset
- 字符串函数strset
- strset
- strset,memset,setmem,strstr,strcat,strncat函数原型
- 系统函数C字符串的实现(12):strset
- strset ( )【C语言库函数源代码】
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- SAP ABAP 中一些常用函数
- strpbrk函数
- hdu1712
- strrev函数
- Delphi DbgridEh实现鼠标拖动选中列,并使复选框选中
- strset函数
- Android中类似于奇虎360手机卫士中摇一摇效果实现
- 利用类的属性来对时间区间的搜索
- js对输入用户名的限制
- Android上的单元测试
- Oracle卸载
- 为你的输入框或者搜索框提供语音输入功能(超酷超装逼超折腾的功能)
- HTTP中Get和Post方式的区别
- memset用法详解