VxWorks Reference Manual : Libraries

ansiCtype

NAME

ansiCtype - ANSI ctype documentation

ROUTINES

isalnum( ) - test whether a character is alphanumeric (ANSI)
isalpha( ) - test whether a character is a letter (ANSI)
iscntrl( ) - test whether a character is a control character (ANSI)
isdigit( ) - test whether a character is a decimal digit (ANSI)
isgraph( ) - test whether a character is a printing, non-white-space character (ANSI)
islower( ) - test whether a character is a lower-case letter (ANSI)
isprint( ) - test whether a character is printable, including the space character (ANSI)
ispunct( ) - test whether a character is punctuation (ANSI)
isspace( ) - test whether a character is a white-space character (ANSI)
isupper( ) - test whether a character is an upper-case letter (ANSI)
isxdigit( ) - test whether a character is a hexadecimal digit (ANSI)
tolower( ) - convert an upper-case letter to its lower-case equivalent (ANSI)
toupper( ) - convert a lower-case letter to its upper-case equivalent (ANSI)

DESCRIPTION

The header ctype.h declares several functions useful for testing and mapping characters. In all cases, the argument is an int, the value of which is representable as an unsigned char or is equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.

The behavior of the ctype functions is affected by the current locale. VxWorks supports only the "C" locale.

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

INCLUDE FILES

ctype.h

SEE ALSO

ansiCtype, American National Standard X3.159-1989


Libraries : Routines

isalnum( )

NAME

isalnum( ) - test whether a character is alphanumeric (ANSI)

SYNOPSIS

int isalnum
    (
    int c /* character to test */
    )

DESCRIPTION

This routine tests whether c is a character for which isalpha( ) or isdigit( ) returns true.

INCLUDE FILES

ctype.h

RETURNS

Non-zero if and only if c is alphanumeric.

SEE ALSO

ansiCtype


Libraries : Routines

isalpha( )

NAME

isalpha( ) - test whether a character is a letter (ANSI)

SYNOPSIS

int isalpha
    (
    int c /* character to test */
    )

DESCRIPTION

This routine tests whether c is a character for which isupper( ) or islower( ) returns true.

INCLUDE FILES

ctype.h

RETURNS

Non-zero if and only if c is a letter.

SEE ALSO

ansiCtype


Libraries : Routines

iscntrl( )

NAME

iscntrl( ) - test whether a character is a control character (ANSI)

SYNOPSIS

int iscntrl
    (
    int c /* character to test */
    )

DESCRIPTION

This routine tests whether c is a control character.

INCLUDE FILES

ctype.h

RETURNS

Non-zero if and only if c is a control character.

SEE ALSO

ansiCtype


Libraries : Routines

isdigit( )

NAME

isdigit( ) - test whether a character is a decimal digit (ANSI)

SYNOPSIS

int isdigit
    (
    int c /* character to test */
    )

DESCRIPTION

This routine tests whether c is a decimal-digit character.

INCLUDE FILES

ctype.h

RETURNS

Non-zero if and only if c is a decimal digit.

SEE ALSO

ansiCtype


Libraries : Routines

isgraph( )

NAME

isgraph( ) - test whether a character is a printing, non-white-space character (ANSI)

SYNOPSIS

int isgraph
    (
    int c /* character to test */
    )

DESCRIPTION

This routine returns true if c is a printing character, and not a character for which isspace( ) returns true.

INCLUDE FILES

ctype.h

RETURNS

Non-zero if and only if c is a printable, non-white-space character.

SEE ALSO

ansiCtype, isspace( )


Libraries : Routines

islower( )

NAME

islower( ) - test whether a character is a lower-case letter (ANSI)

SYNOPSIS

int islower
    (
    int c /* character to test */
    )

DESCRIPTION

This routine tests whether c is a lower-case letter.

INCLUDE FILES

ctype.h

RETURNS

Non-zero if and only if c is a lower-case letter.

SEE ALSO

ansiCtype


Libraries : Routines

isprint( )

NAME

isprint( ) - test whether a character is printable, including the space character (ANSI)

SYNOPSIS

int isprint
    (
    int c /* character to test */
    )

DESCRIPTION

This routine returns true if c is a printing character or the space character.

INCLUDE FILES

ctype.h

RETURNS

Non-zero if and only if c is printable, including the space character.

SEE ALSO

ansiCtype


Libraries : Routines

ispunct( )

NAME

ispunct( ) - test whether a character is punctuation (ANSI)

SYNOPSIS

int ispunct
    (
    int c /* character to test */
    )

DESCRIPTION

This routine tests whether a character is punctuation, i.e., a printing character for which neither isspace( ) nor isalnum( ) is true.

INCLUDE FILES

ctype.h

RETURNS

Non-zero if and only if c is a punctuation character.

SEE ALSO

ansiCtype


Libraries : Routines

isspace( )

NAME

isspace( ) - test whether a character is a white-space character (ANSI)

SYNOPSIS

int isspace
    (
    int c /* character to test */
    )

DESCRIPTION

This routine tests whether a character is one of the standard white-space characters, as follows:

space "\0"
horizontal tab \t
vertical tab \v
carriage return \r
new-line \n
form-feed \f

INCLUDE FILES

ctype.h

RETURNS

Non-zero if and only if c is a space, tab, carriage return, new-line, or form-feed character.

SEE ALSO

ansiCtype


Libraries : Routines

isupper( )

NAME

isupper( ) - test whether a character is an upper-case letter (ANSI)

SYNOPSIS

int isupper
    (
    int c /* character to test */
    )

DESCRIPTION

This routine tests whether c is an upper-case letter.

INCLUDE FILES

ctype.h

RETURNS

Non-zero if and only if c is an upper-case letter.

SEE ALSO

ansiCtype


Libraries : Routines

isxdigit( )

NAME

isxdigit( ) - test whether a character is a hexadecimal digit (ANSI)

SYNOPSIS

int isxdigit
    (
    int c /* character to test */
    )

DESCRIPTION

This routine tests whether c is a hexadecimal-digit character.

INCLUDE FILES

ctype.h

RETURNS

Non-zero if and only if c is a hexadecimal digit.

SEE ALSO

ansiCtype


Libraries : Routines

tolower( )

NAME

tolower( ) - convert an upper-case letter to its lower-case equivalent (ANSI)

SYNOPSIS

int tolower
    (
    int c /* character to convert */
    )

DESCRIPTION

This routine converts an upper-case letter to the corresponding lower-case letter.

INCLUDE FILES

ctype.h

RETURNS

If c is an upper-case letter, it returns the lower-case equivalent; otherwise, it returns the argument unchanged.

SEE ALSO

ansiCtype


Libraries : Routines

toupper( )

NAME

toupper( ) - convert a lower-case letter to its upper-case equivalent (ANSI)

SYNOPSIS

int toupper
    (
    int c /* character to convert */
    )

DESCRIPTION

This routine converts a lower-case letter to the corresponding upper-case letter.

INCLUDE FILES

ctype.h

RETURNS

If c is a lower-case letter, it returns the upper-case equivalent; otherwise, it returns the argument unchanged.

SEE ALSO

ansiCtype