Cctype Function Series

Source: Internet
Author: User

Functions for #include <cctype>

C + + should be # include <cctype>

c should be # include <ctype.h>

The following functions are commonly used in the character library:

Function name return value
Isalnum () If the argument is an alphanumeric character, that is, a letter or a number, the function returns True
Isalpha () If the argument is a letter, the function returns the True
Isblank () If the argument is a space or a horizontal tab, the function returns True
Iscntrl () If the argument is a control character, the function returns True
IsDigit () If the argument is a number (0~9), the function returns True
Isgraph () If the argument is a print character other than a space, the function returns True
Islower () If the argument is a lowercase letter, the function returns True
Isprint () If the argument is a print character (including a space), the function returns True
Ispunct () If the argument is a punctuation mark, the function returns True
Isspace ()

If the parameter is a standard white space character, such as a space, feed, line break, carriage return

, horizontal tab, or Vertical tab, the function returns True

Isupper () If the argument is an uppercase letter, the function returns True
Isxdigit () If the argument is a hexadecimal number, that is 0~9, A~f, a~f, the function returns True
ToLower () If the argument is an uppercase character, it is returned in lowercase, otherwise the parameter is returned
ToUpper () If the argument is a lowercase letter, it is returned in uppercase, otherwise the parameter is returned

Commonly used are:

ToLower ()--toupper ()

Isupper ()--islower ()

Isalnum ()--isalpha ()

Cctype Function Series

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.