c库函数之二 - toupper函数
来源:互联网 发布:使命召唤8武器数据 编辑:程序博客网 时间:2024/06/03 23:07
头文件:#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;!#$
0 0
- c库函数之二 - toupper函数
- 部分C库函数重写以及反汇编分析之 toupper()
- toupper ( )【C语言库函数源代码】
- C语言函数:toupper
- toupper() 函数
- toupper函数
- toupper函数
- toupper()函数
- toupper()函数
- toupper.c
- C++ 误区之 cout<<toupper(c)
- linux系统编程之基础必备(二):C 标准IO 库函数与Unbuffered IO函数
- linux系统编程之基础必备(二):C 标准IO 库函数与Unbuffered IO函数
- C/C++库函数(tolower/toupper)实现字母的大小写转换
- C语言库函数二
- tolower函数toupper函数
- C语言toupper()函数:将小写字母转换为大写字母
- string toupper函数
- Spring自动注入,@Autowired
- 2016 总结
- LeetCode129. Sum Root to Leaf Numbers
- Python Qt GUI快速编程-第四章的Exercise例子Interest的python3+pytq5+Qt Designer实现
- LeetCode278. First Bad Version(二分)
- c库函数之二 - toupper函数
- LeetCode365. Water and Jug Problem(找规律)
- 小程序 使用view实现下拉刷新,上拉加载数据
- undo Segment深入解析
- 使用SLF4J+log4j代替commons-logging
- Android设计模式学习笔记(策略模式)
- Tomcat 修改Linux下tomcat的JVM内存大小
- Android开发人员不得不收集的代码(持续更新中)
- 探究MVVM