Mercurial > hg > Members > kono > nitros9-code
view docs/ccguide/isalpha.refentry @ 1331:0a3500c747de
Fixed ANOTHER bug
author | boisy |
---|---|
date | Sun, 07 Sep 2003 00:53:51 +0000 |
parents | 94ff9d15614f |
children |
line wrap: on
line source
<refentry id="isalpha"> <refnamediv> <refname>Isalpha</refname> <refname>Isupper</refname> <refname>Islower</refname> <refname>Isdigit</refname> <refname>Isalnum</refname> <refname>Isspace</refname> <refname>Ispunct</refname> <refname>Isprint</refname> <refname>Iscntrl</refname> <refname>Isascii</refname> <refpurpose>character classification</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> #include <ctype.h> </funcsynopsisinfo> <funcprototype> <funcdef><function>isalpha</function></funcdef> <paramdef>int <parameter>c</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1><title>Description</title> <para> These functions use table look-up to classify characters according to their ascii value. The header file defines them as macros which means that they are implemented as fast, inline code rather than subroutines. </para> <para> Each results in non-zero for true or zero for false. </para> <para> The correct value is guaranteed for all integer values in isascii, but the result is unpredictable in the others if the argument is outside the range -1 to 127. </para> <para> The truth tested by each function is a follows: </para> <informaltable frame="none"> <tgroup cols="2"> <colspec colwidth="1in"/> <colspec colwidth="3in"/> <tbody> <row> <entry>isalpha</entry> <entry>c is a letter</entry> </row> <row> <entry>isdigit</entry> <entry>c is a digit</entry> </row> <row> <entry>isupper</entry> <entry>c is an upper case letter</entry> </row> <row> <entry>islower</entry> <entry>c is a lower case letter</entry> </row> <row> <entry>isalnum</entry> <entry>c is a letter or a digit</entry> </row> <row> <entry>isspace</entry> <entry>c is a space, tab character, newline, carriage return or formfeed</entry> </row> <row> <entry>iscntrl</entry> <entry>c is a control character (0 to 32) or DEL (127)</entry> </row> <row> <entry>ispunct</entry> <entry>c is neither countrol nor alpha-numeric</entry> </row> <row> <entry>isprint</entry> <entry>c is printable (32 to 126)</entry> </row> <row> <entry>isascii</entry> <entry>c is in the range -1 to 127</entry> </row> </tbody> </tgroup> </informaltable> </refsect1> </refentry>