tolower
来源:互联网 发布:snmpwalk 命令 端口 编辑:程序博客网 时间:2024/05/13 17:21
头文件:#include <stdlib.h>
定义函数:int tolower(int c);
函数说明:若参数 c 为大写字母则将该对应的小写字母返回。
返回值:返回转换后的小写字母,若不须转换则将参数c 值返回。
范例:将s 字符串内的大写字母转换成小写字母。
执行结果:
before tolower() : aBcDeFgH12345;!#$
after tolower() : abcdefgh12345;!#$
定义函数:int tolower(int c);
函数说明:若参数 c 为大写字母则将该对应的小写字母返回。
返回值:返回转换后的小写字母,若不须转换则将参数c 值返回。
范例:将s 字符串内的大写字母转换成小写字母。
- #include <ctype.h>
- main(){
- char s[] = "aBcDeFgH12345;!#$";
- int i;
- printf("before tolower() : %s\n", s);
- for(i = 0; i < sizeof(s); i++)
- s[i] = tolower(s[i]);
- printf("after tolower() : %s\n", s);
- }
#include <ctype.h>main(){ char s[] = "aBcDeFgH12345;!#$"; int i; printf("before tolower() : %s\n", s); for(i = 0; i < sizeof(s); i++) s[i] = tolower(s[i]); printf("after tolower() : %s\n", s);}
执行结果:
before tolower() : aBcDeFgH12345;!#$
after tolower() : abcdefgh12345;!#$
0 0
- tolower
- tolower
- tolower
- tolower
- tolower
- tolower()
- tolower/toupper
- tolower.c
- tolower() 函数
- tolower用法
- tolower函数
- tolower (Function)
- tolower函数的用法
- tolower <ctype.h> <cctype>
- toupper 和 tolower
- toupper, tolower, isupper, islower
- strdup tolower toupper 实例
- poj1256 tolower函数
- toupper
- TF-IDF及其算法
- List多个字段排序、去重
- 第九周项目二 分数的累加
- setsockopt
- tolower
- 绩效考核功能操作流程
- PHP抽象工厂模式
- toascii
- python 堆栈与队列
- Linux睡眠唤醒机制--Kernel态2
- 用MFC的对话框制作一个简易的图片浏览器
- Java魔法堂:String.format详解
- strtoul