string 类 判断字符的一些函数

isalnum(c)
True if c is a letter or a digit.
如果 c 是字母或数字,则为 True。
isalpha(c)
true if c is a letter.
如果 c 是字母,则为 true。
iscntrl(c)
true if c is a control character.
如果 c 是控制字符,则为 true
isdigit(c)
true if c is a digit.
如果 c 是数字,则为 true。
isgraph(c)
true if c is not a space but is printable.
如果 c 不是空格,但可打印,则为 true。
islower(c)
true if c is a lowercase letter.
如果 c 是小写字母,则为 true。
isprint(c)
True if c is a printable character.
如果 c 是可打印的字符,则为 true。
ispunct(c)
True if c is a punctuation character.
如果 c 是标点符号,则 true。
isspace(c)
true if c is whitespace.
如果 c 是空白字符,则为 true。
isupper(c)
True if c is an uppercase letter.
如果 c 是大写字母,则 true。
isxdigit(c) true if c is a hexadecimal digit.
如果是 c 十六进制数,则为 true。
tolower(c) If c is an uppercase letter, returns its lowercase equivalent;
otherwise returns c unchanged.
如果 c 大写字母,返回其小写字母形式,否则直接返回 c。
toupper(c) If c is a lowercase letter, returns its uppercase equivalent;
otherwise returns c unchanged.
如果 c 是小写字母,则返回其大写字母形式,否则直接返回 c。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值