home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

Writing Apache Modules with Perl and C
By:   Lincoln Stein and Doug MacEachern
Published:   O'Reilly & Associates, Inc.  - March 1999

Copyright © 1999 by O'Reilly & Associates, Inc.


 


   Show Contents   Previous Page   Next Page

Chapter 11 - C API Reference Guide, Part II / String and URI Manipulation
Type Checking Macros

Apache provides a set of wrappers around the standard character class macros found in the ctype.h header file. The reason for these wrappers is to provide correct behavior on systems that support 8-bit characters. Unfortunately, not all C libraries are fully internationalized.

Even if you don't care about 8-bit support, it is a good idea to use the ap_ character class macros instead of the standard equivalents because they guarantee compatibility should locale support be added to Apache in the future.

These functions can be found in header file ap_ctype.h:

int ap_isalnum (int character)

Returns true if character is alphanumeric.

int ap_isalpha (int character)

Returns true if character is alphabetic.

int ap_iscntrl (int character)

Returns true if character is a control character.

int ap_isdigit (int character)

Returns true if character is a numeric digit.

int ap_isgraph (int character)

Returns true if character is any printable character except the space.

int ap_islower (int character)

Returns true for lowercase characters.

int ap_isprint (int character)

Returns true if character is printable.

int ap_ispunct (int character)

Returns true for a punctuation character (neither a space nor alphanumeric).

int ap_isspace (int character)

Returns true for whitespace characters.

int ap_isupper (int character)

Returns true for uppercase characters.

int ap_tolower (int character)

Returns the lowercase version of character.

int ap_toupper (int character)

Returns the uppercase version of character.

   Show Contents   Previous Page   Next Page
Copyright © 1999 by O'Reilly & Associates, Inc.










??????????????@Mail.ru