C Standard Library Reference Guide (2) ctype.h

Source: Internet
Author: User
Tags character set control characters delete key printable characters reference

2. ctype.h

The character class header file is used to test characters and convert characters. A control character that references another character that is not part of a printable character set. In the ASCII character set, all characters 0x0 to 0x1f and 0x7f (delete key) are control characters, printable characters from 0x20 (spaces) to 0x7e (wave numbers).

Function:

Isalnum ();

Isalpha ();

Iscntrl ();

IsDigit ();

Isgraph ();

Islower ();

Isprint ();

Ispunct ();

Isspace ();

Isupper ();

Isxdigit ();

ToLower ();

ToUpper ();

2.1. Is ... Functions

Statement:

int isalnum (intcharacter);

int Isalpha (intcharacter);

int Iscntrl (intcharacter);

int isdigit (intcharacter);

int isgraph (intcharacter);

int islower (intcharacter);

int isprint (intcharacter);

int ispunct (intcharacter);

int isspace (intcharacter);

int Isupper (intcharacter);

int isxdigit (int character);

Functions such as "is ..." test the character in the instrumentation parameter and return a non-0 value (TRUE) when the character satisfies the condition. Returns 0 (false) if it is not satisfied.

Conditions:

Isalnum English letters (A to Z, or A to Z), or Arabic numerals (0 to 9)
Isalpha English letters (A to Z, or A to Z)
Iscntrl Control characters (0x00 to 0x1f, or 0x7f)
IsDigit Arabic numerals (0 to 9)
Isgraph Any printable character other than a space (0x21 to 0x7e)
Islower Lowercase letters (A to Z)
Isprint printable characters (0x20 to 0x7e)
Ispunct Punctuation (except spaces, printable characters outside of album)
Isspace White space characters (spaces, tabs, carriage returns, line breaks, portrait tabs, page breaks, form feeds)
Isupper Uppercase letters (A to Z)
Isxdigit Hexadecimal number (0 to 9,a to F, or a to f)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.