函数tolower().isalpha()
来源:互联网 发布:乐高75103淘宝 编辑:程序博客网 时间:2024/06/05 02:52
tolower是一种函数,功能把字符转换成小写字母,非字母字符不做出处理。
s[I]=ABCsad;
s[i] = tolower(s[i]) 将大写转换为小写
使用例子:
#include<iostream>#include<string>using namespace std;int main(){string a;cin >> a;for(int i=0;i<a.size();i++)a[i] = tolower(a[i]);cout << a;return 0;}
只转换字母,符号与数字均不发生改变。
------------------------
#include<iostream>#include<string>#include<cctype> using namespace std;int main(){string a;cin >> a[0];cout << isalpha(a[0]);return 0;}
isalpha意思为判断a[0]是否为字母,若为字母返回1.其头文件为<cctype>
0 0
- 函数tolower().isalpha()
- 头文件 <ctype.h> 以及函数 isalpha() tolower()
- STL tolower,isalpha用法
- isalpha () 函数
- isalpha函数
- isalpha函数
- isalpha函数
- tolower() 函数
- tolower函数
- isdigit函数,isalpha函数
- tolower函数toupper函数
- isalpha函数使用
- isalpha()函数
- tolower函数的用法
- poj1256 tolower函数
- isalpha
- isalpha
- isalpha
- Bitmap转成高斯模糊图片
- Linux中more和less命令用法
- EXTJS4 gridpanel中动态的显示/隐藏某个列
- 2.2 资源的管理与使用
- 学习MFC的博客
- 函数tolower().isalpha()
- 安卓实现固定横屏或竖屏
- 用初次训练的SVM+HOG分类器在负样本原图上检测HardExample
- vim替换所有字符串
- 从0开始学习 GitHub 系列之「05.Git 进阶」
- 程序员不得不知道的技术面试资料大全
- 新手必须知道的redux-react-webpack基本架构原理
- ADB 命令介绍 -stormzhang
- Java高并发程序设计笔记2之并行程序基础