Friday, July 24, 2015

7.4 Character handling(ctype)

The header <ctype.h> declares several functions useful for classifying and mapping
characters.166) In all cases the argument is an int, the value of which shall be
representable as an unsigned char or shall equal the value of the macro EOF(0xffFFffFF). If the
argument has any other value, the behavior is undefined.

The term printing character refers to a member of a locale-specific set of characters, each
of which occupies one printing position on a display device; the term control character
refers to a member of a locale-specific set of characters that are not printing
characters.

The isalpha function tests for any character for which isupper or islower is true,
or any character that is one of a locale-specific...

The isblank function tests for any character that is a standard blank character or is one
of a locale-specific set of characters for which isspace is true and that is used to
separate words within a line of text. The standard blank characters are the following:
space (' '), and horizontal tab ('\t').

The isspace function tests for any character that is a standard white-space character or
is one of a locale-specific set of characters. The standard white-space characters are the following: space (' '), form feed ('\f'), new-line
('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v').(blank<space,LF,VT,FF,CR属于space但不属于blank)

isxdigit: 0~9 a~f A~F

No comments:

Post a Comment