Xinu7/man/man3/ctype.doc




CTYPE(3)            Xinu Programmer's Manual             CTYPE(3)



NAME
     ctype - character type predicates and manipulation routines

SYNOPSIS
     #include <ctype.h>

     isalpha(c)
     ...
     toascii(c)
     tolower(c)
     toupper(c)
     char c;

DESCRIPTION
     Routines beginning with _i_s are predicates that classify the
     type of a character.  Routines beginning with _t_o convert
     characters.  Each predicate returns _T_R_U_E if the condition is
     satisfied, and _F_A_L_S_E otherwise.  In the current implementa-
     tion, predicates are macros that use table lookup for effi-
     ciency.

     _i_s_a_l_n_u_m        _c is an alphanumeric character (i.e., a
                    letter or digit)

     _i_s_a_l_p_h_a        _c is a lower- or upper-case letter

     _i_s_a_s_c_i_i        _c is an ASCII character, code less than 0200

     _i_s_c_n_t_r_l        _c has a value less than octal 040 or is a DEL
                    (octal value 0177).

     _i_s_d_i_g_i_t        _c is a digit.

     _i_s_l_o_w_e_r        _c is a lower case letter.

     _i_s_p_r_i_n_t        _c is a printable character with octal value
                    040 (blank) through 0176 (tilde).

     _i_s_p_r_s_h_o_r_t      _c is a printable short.

     _i_s_p_u_n_c_t        _c is a punctuation character (neither control
                    nor alphanumeric).

     _i_s_s_p_a_c_e        _c is a space, tab, carriage return, newline,
                    or formfeed.

     _i_s_u_p_p_e_r        _c is an upper case letter.

     _i_s_x_d_i_g_i_t       _c is a hexadecimal digit (i.e., is 0-9 or a-
                    f).

     _t_o_a_s_c_i_i        Converts _c to an ascii by turning off high-



Version 6b               Printed 1/12/87                        1






CTYPE(3)            Xinu Programmer's Manual             CTYPE(3)



                    order bits.

     _t_o_l_o_w_e_r        Converts argument _c from upper to lower case.

     _t_o_u_p_p_e_r        Converts argument _c from lower to upper case.


















































Version 6b               Printed 1/12/87                        2