1 判断字符串中是否有数字 i.isdigit()==True else False #判断是否是数字i.isalpha()==True else False #判断是否是字母 i.isspace()==True else False # 判断是否有空格 ...
分类:
编程语言 时间:
2016-05-22 21:30:46
阅读次数:
169
s为字符串 s.isalnum() 所有字符都是数字或者字母 s.isalpha() 所有字符都是字母 s.isdigit() 所有字符都是数字 s.islower() 所有字符都是小写 s.isupper() 所有字符都是大写 s.istitle() 所有单词都是首字母大写,像标题 s.isspa ...
分类:
编程语言 时间:
2016-05-14 18:54:43
阅读次数:
137
1. 字符串判断 str.isalnum() 返回:True, 都是字母或数字 str.isalpha() 返回:True, 都是字母 str.isdigit() 返回:True, 都是数字 str.istitle() 返回:True, 首字母都是大写 str.isspace() 返回:True, ...
分类:
编程语言 时间:
2016-05-13 19:11:01
阅读次数:
219
首先我们来说一下同步是什么:其实所谓同步,就是在发出一个功能调用时,在没有得到结果之前,该调用就不返回,同时其它线程也不能调用这个方法。按照这个定义,其实绝大多数函数都是同步调用(例如sin,isdigit等)。但是一般而言,我们在说同步、异步的时候,特指那些需要其他..
分类:
编程语言 时间:
2016-05-03 14:41:56
阅读次数:
238
ctype
ctype.h中的函数是用来分析字符。常用方法如下:
tolower():返回参数的小写形式。如果本身是小写,就直接返回该小写字符。
toupper():返回参数的大写形式。
isdigit():是否是阿拉伯数字。
isalpha():是否是字母。
isalnum():是否是字母...
分类:
其他好文 时间:
2016-04-21 11:51:27
阅读次数:
227
判断是否是数字 isDigit isNumber 二者区别http://www.cnblogs.com/xiashengwang/p/3219925.html判断字母 isalpha: 判断字符ch是否为英文字母,若为小写字母,返回2,若为大写字母,返回1。若不是字母,返回0。 isupper (i...
分类:
其他好文 时间:
2016-03-16 22:23:02
阅读次数:
191
#include<stdio.h>
#include<stdlib.h>
#include<ctype.h>
intfun()
{
intch;
intret=0;
while(isdigit(ch=getchar()))
{
ret=ret*10+ch-48;
}
ungetc(ch,stdin);
returnret;
}
voidfun1()
{
intch;
intret=fun();
printf("%d\n",ret);
ch=getchar();
putch..
分类:
其他好文 时间:
2016-03-10 01:49:29
阅读次数:
140
//implement a calculator //no bracket #include <iostream> #include<cctype>//the 'isdigit' which was included in it will be used in the funcion named n
分类:
其他好文 时间:
2016-02-08 21:14:55
阅读次数:
194
函数名称 返回值 isalnum() 字母或数字 isalpha() 字母 iscntrl() 控制字符 isdigit() 数字(1 ~ 9) isgraph() 除空格之外的打印字符 islower() 小写字母 isprint() 打印字符(包括空格) ispunct() 标点符号 isspa
分类:
其他好文 时间:
2016-02-02 01:11:58
阅读次数:
212