C++ String对象中字符的处理
来源:互联网 发布:星河战队 知乎 编辑:程序博客网 时间:2024/04/28 05:15
对string对象中的单个字符进行处理、判断.以下列出各种字符操作函数,适用于string对象的字符(或其他任何char值)
这些函数都在 cctype头文件 中定义:
isalnum(c) 如果c是字母或数字,则为true
isalpha(c) 如果c是字母,则为true
iscntrl(c) 如果c是控制字符,则为true
isdigit(c) 如果c是数字,则为true
isgraph(c) 如果c不是空格,但可打印,则为true
islower(c) 如果c是小写字母,则为true
isprint(c) 如果c是可打印的字符,则为true
ispunct(c) 如果c是标点符号,则为true
isspace(c) 如果c是空白符,则true
isupper(c) 如果c是大写字母,则true
isxdigit(c) 如果c是十六进制数,则ture
tolower(c) 如果c是大写字母,则返回其小写字母形式,否则直接返回c
toupper(c) 如果c是小写字母,则返回其大写字母形式,否则直接返回c
摘自C++PRIMER 第四饭.
- string对象中字符的处理
- C++中处理string对象的字符
- C++ String对象中字符的处理
- string对象中字符的处理
- string对象中字符的处理
- string对象处理字符(C++)
- 处理string对象中的字符
- 逐梦C++补遗篇之四:string对象中字符的处理
- string对象中获取字符
- C++:如何删除string对象的末尾非数字字符
- (13)处理string对象中的字符
- 标准库容器 vector中 string的字符处理。
- 标准库容器 vector 中string的字符 处理
- C++学习笔记 string 中处理字符的方法
- 对string对象的操作,对string对象中字符的操作:
- [c++]string中删除相同字符
- C中关于字符串和字符的处理函数
- C语言中字符和字符串的处理函数总结
- 直方图规定化之SML和GML映射
- C++编写自己的头文件
- cocos2dx在android的问题
- ewf
- Android中xml设置Animation动画
- C++ String对象中字符的处理
- WinCE触摸屏驱动(开发详解)
- hdu2601 An easy problem
- 2012年北理工计算机学院保研C++上机复试题(一)
- http://acm.nyist.edu.cn/JudgeOnline/problem.php?pid=301 (矩阵的用法)
- Linux嵌入式 -- 内核 - 内存管理
- C++标准库vector类(简单用法记录)
- stl hashmap与map hashmap与hashtable
- C语言猴子算法(BOGO)