toupper函数
来源:互联网 发布:java语言的优势 编辑:程序博客网 时间:2024/06/05 20:32
头文件:#include <ctype.h>
定义函数:int toupper(int c);
函数说明:若参数 c 为小写字母则将该对应的大写字母返回.
返回值:返回转换后的大写字母, 若不须转换则将参数c 值返回.
范例 /* 将s 字符串内的小写字母转换成大写字母 */
#include <ctype.h>
main()
{
char s[] = "aBcDeFgH12345;!#$";
int i;
printf("before toupper() : %s\n", s);
for(i = 0; I < sizeof(s); i++)
s[i] = toupper(s[i]);
printf("after toupper() : %s\n", s);
}
执行结果:
before toupper() : aBcDeFgH12345;!#$
after toupper() : ABCDEFGH12345;!#$
定义函数:int toupper(int c);
函数说明:若参数 c 为小写字母则将该对应的大写字母返回.
返回值:返回转换后的大写字母, 若不须转换则将参数c 值返回.
范例 /* 将s 字符串内的小写字母转换成大写字母 */
#include <ctype.h>
main()
{
char s[] = "aBcDeFgH12345;!#$";
int i;
printf("before toupper() : %s\n", s);
for(i = 0; I < sizeof(s); i++)
s[i] = toupper(s[i]);
printf("after toupper() : %s\n", s);
}
执行结果:
before toupper() : aBcDeFgH12345;!#$
after toupper() : ABCDEFGH12345;!#$
0 0
- toupper() 函数
- toupper函数
- toupper函数
- toupper()函数
- toupper()函数
- tolower函数toupper函数
- C语言函数:toupper
- string toupper函数
- toupper
- toupper()
- toupper
- toupper
- C++ tolower函数 与 toupper函数
- 一天一个CRT函数 __toascii tolower toupper
- transform算法中使用toupper函数
- toupper字符串转换函数应用实例
- c库函数之二 - toupper函数
- C语言toupper()函数:将小写字母转换为大写字母
- 微机接口课程设计报告-模拟汽车控制系统
- 黑马程序员-----JAVA面向对象
- java树形表
- 在keyboard上面增加toolbar提供便捷操作-保持keyboard
- 中断_同步和异步禁止
- toupper函数
- Linux系统下Xorg占用率较高问题定位
- Xcode 5 Tutorial - Change App Icon
- java树形菜单
- 技术资料手机~数据库
- 目标框架framework不同对项目的影响
- java树形表单
- 为你的整轨APE音乐制作CUE文件(图文)
- java树形菜单实现