zoukankan      html  css  js  c++  java
  • C Standard Library: 2 Character Class Tests: <ctype.h>

    2 Character Class Tests: <ctype.h>

    The header <ctype.h> declares functions for testing characters. For each function, the
    argument list is an int, whose value must be EOF or representable as an unsigned char, and
    the return value is an int. The functions return non-zero (true) if the argument c satisfies the
    condition described, and zero if not.
    isalnum(c) isalpha(c) or isdigit(c) is true
    isalpha(c) isupper(c) or islower(c) is true
    iscntrl(c) control character
    isdigit(c) decimal digit
    isgraph(c) printing character except space
    islower(c) lower-case letter
    isprint(c) printing character including space
    ispunct(c) printing character except space or letter or digit
    isspace(c) space, formfeed, newline, carriage return, tab, vertical tab
    isupper(c) upper-case letter
    isxdigit(c) hexadecimal digit
    In the seven-bit ASCII character set, the printing characters are 0x20 (' ') to 0x7E ('-');
    the control characters are 0 NUL to 0x1F (US), and 0x7F (DEL).
    In addition, there are two functions that convert the case of letters:
    int tolower(c) convert c to lower case
    int toupper(c) convert c to upper case
    If c is an upper-case letter, tolower(c) returns the corresponding lower-case letter,
    toupper(c) returns the corresponding upper-case letter; otherwise it returns c.

  • 相关阅读:
    写了一个具有future接口的rust测试代码
    lua:写了个基于协程的task调度库
    最近阅读
    电视投屏
    树莓派 系统备份
    Kindle支持的文件格式
    树莓派 more
    用google translate大文件
    NFC 大电池 高性价比手机
    rust debug之基于pdb
  • 原文地址:https://www.cnblogs.com/freewater/p/2972580.html
Copyright © 2011-2022 走看看