⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ctype.html

📁 ST20 Embedded Toolset R2.0.5用于开发基于ST20芯片机顶盒软件的开发平台,2.0.5版本,国内找不到的.在国外论坛上花了N天才找到!
💻 HTML
字号:
<HTML><HEAD><TITLE>&lt;ctype.h&gt;</TITLE></HEAD><BODY><H1><A NAME="&lt;ctype.h&gt;"><CODE>&lt;ctype.h&gt;</CODE></A></H1><HR><P><B><CODE><A HREF="#isalnum">isalnum</A>&#183; <A HREF="#isalpha">isalpha</A>&#183; <A HREF="#iscntrl">iscntrl</A>&#183; <A HREF="#isdigit">isdigit</A>&#183; <A HREF="#isgraph">isgraph</A>&#183; <A HREF="#islower">islower</A>&#183; <A HREF="#isprint">isprint</A>&#183; <A HREF="#ispunct">ispunct</A>&#183; <A HREF="#isspace">isspace</A>&#183; <A HREF="#isupper">isupper</A>&#183; <A HREF="#isxdigit">isxdigit</A>&#183; <A HREF="#tolower">tolower</A>&#183; <A HREF="#toupper">toupper</A></CODE></B></P><HR><P>Include the standard header <B><CODE>&lt;ctype.h&gt;</CODE></B>to declare several functions that are usefulfor classifying and mapping codes from thetarget character set. Every function that has a parameter of type<I>int</I> can accept the value of the macro<A HREF="stdio.html#EOF"><CODE>EOF</CODE></A> or any valuerepresentable as type <I>unsigned char.</I> Thus, the argument canbe the value returned by any of the functions<A HREF="stdio.html#fgetc"><CODE>fgetc</CODE></A>,<A HREF="stdio.html#fputc"><CODE>fputc</CODE></A>,<A HREF="stdio.html#getc"><CODE>getc</CODE></A>,<A HREF="stdio.html#getchar"><CODE>getchar</CODE></A>,<A HREF="stdio.html#putc"><CODE>putc</CODE></A>,<A HREF="stdio.html#putchar"><CODE>putchar</CODE></A>,<A HREF="#tolower"><CODE>tolower</CODE></A>,<A HREF="#toupper"><CODE>toupper</CODE></A>, and<A HREF="stdio.html#ungetc"><CODE>ungetc</CODE></A>.You must not call these functionswith other argument values.</P><P>Other library functions use these functions. The function<A HREF="stdio.html#scanf"><CODE>scanf</CODE></A>,for example, uses the function<A HREF="#isspace"><CODE>isspace</CODE></A>to determine valid white space within an input field.</P><P>The<B><A NAME="character classification">character classification</A></B>functions are strongly interrelated.Many are defined in terms of other functions. For characters in the<A HREF="charset.html#basic C character set">basic C character set</A>, here arethe dependencies between these functions:</P><P><IMG SRC="ctype.gif"></P><P>The diagram indicates with <CODE>+</CODE> those functions that candefine additional characters in locales other than the<A HREF="locale.html#C locale"><CODE>"C"</CODE></A> locale.<B>Boldface</B> indicates a feature added with<A HREF="lib_over.html#C99">C99</A>.</P><P>The diagram tells you that the function<A HREF="#isprint"><CODE>isprint</CODE></A>returns nonzero for <CODE><I>space</I></CODE> or forany character for which the function<A HREF="#isgraph"><CODE>isgraph</CODE></A> returns nonzero.The function<A HREF="#isgraph"><CODE>isgraph</CODE></A>, in turn,returns nonzero for any character for which either the function<A HREF="#isalnum"><CODE>isalnum</CODE></A> or the function<A HREF="#ispunct"><CODE>ispunct</CODE></A>returns nonzero. The function<A HREF="#isdigit"><CODE>isdigit</CODE></A>,on the other hand, returns nonzero only for the digits<CODE>0-9</CODE>.</P><P>An implementation can define additional characters that returnnonzero for some of these functions. Any character set can containadditional characters that return nonzero for:</P><UL><LI><A HREF="#iscntrl"><CODE>iscntrl</CODE></A>(provided the characters cause<A HREF="#isprint"><CODE>isprint</CODE></A> to return zero)</LI><LI><A HREF="#ispunct"><CODE>ispunct</CODE></A>(provided the characters cause<A HREF="#isalnum"><CODE>isalnum</CODE></A> to return zero)</LI></UL><P>The diagram indicates with <CODE>++</CODE> those functions that candefine additional characters in any character set.Moreover, locales other than the<A HREF="locale.html#C locale"><CODE>"C"</CODE></A> localecan define additional characters that return nonzero for:<UL><LI><A HREF="#isalpha"><CODE>isalpha</CODE></A>,<A HREF="#isupper"><CODE>isupper</CODE></A>, and<A HREF="#islower"><CODE>islower</CODE></A>(provided the characters cause<A HREF="#iscntrl"><CODE>iscntrl</CODE></A>,<A HREF="#isdigit"><CODE>isdigit</CODE></A>,<A HREF="#ispunct"><CODE>ispunct</CODE></A>, and<A HREF="#isspace"><CODE>isspace</CODE></A> to return zero)</LI><LI><A HREF="#isspace"><CODE>isspace</CODE></A>(provided the characters cause<A HREF="#isprint"><CODE>isprint</CODE></A> to return zero)</LI></UL><P>Note that an implementation can define locales other than the<A HREF="locale.html#C locale"><CODE>"C"</CODE></A> localein which a character can cause<A HREF="#isalpha"><CODE>isalpha</CODE></A> (and hence<A HREF="#isalnum"><CODE>isalnum</CODE>)</A>to return nonzero, yet still cause<A HREF="#isupper"><CODE>isupper</CODE></A> and<A HREF="#islower"><CODE>islower</CODE></A> to return zero.<PRE>int <A HREF="#isalnum"><B>isalnum</B></A>(int c);int <A HREF="#isalpha"><B>isalpha</B></A>(int c);int <A HREF="#iscntrl"><B>iscntrl</B></A>(int c);int <A HREF="#isdigit"><B>isdigit</B></A>(int c);int <A HREF="#isgraph"><B>isgraph</B></A>(int c);int <A HREF="#islower"><B>islower</B></A>(int c);int <A HREF="#isprint"><B>isprint</B></A>(int c);int <A HREF="#ispunct"><B>ispunct</B></A>(int c);int <A HREF="#isspace"><B>isspace</B></A>(int c);int <A HREF="#isupper"><B>isupper</B></A>(int c);int <A HREF="#isxdigit"><B>isxdigit</B></A>(int c);int <A HREF="#tolower"><B>tolower</B></A>(int c);int <A HREF="#toupper"><B>toupper</B></A>(int c);</PRE><H2><A NAME="isalnum"><CODE>isalnum</CODE></A></H2><PRE>int <B>isalnum</B>(int c);</PRE><P>The function returns nonzero if <CODE>c</CODE> is any of:</P><PRE>a b c d e f g h i j k l m n o p q r s t u v w x y zA B C D E F G H I J K L M N O P Q R S T U V W X Y Z0 1 2 3 4 5 6 7 8 9</PRE><P>or any other locale-specific alphabetic character.</P><H2><A NAME="isalpha"><CODE>isalpha</CODE></A></H2><PRE>int <B>isalpha</B>(int c);</PRE><P>The function returns nonzero if <CODE>c</CODE> is any of:</P><PRE>a b c d e f g h i j k l m n o p q r s t u v w x y zA B C D E F G H I J K L M N O P Q R S T U V W X Y Z</PRE><P>or any other locale-specific alphabetic character.</P><H2><A NAME="iscntrl"><CODE>iscntrl</CODE></A></H2><PRE>int <B>iscntrl</B>(int c);</PRE><P>The function returns nonzero if <CODE>c</CODE> is any of:</P><PRE><I>BEL BS CR FF HT NL VT</I></PRE><P>or any other implementation-defined control character.</P><H2><A NAME="isdigit"><CODE>isdigit</CODE></A></H2><PRE>int <B>isdigit</B>(int c);</PRE><P>The function returns nonzero if <CODE>c</CODE> is any of:</P><PRE>0 1 2 3 4 5 6 7 8 9</PRE><H2><A NAME="isgraph"><CODE>isgraph</CODE></A></H2><PRE>int <B>isgraph</B>(int c);</PRE><P>The function returns nonzero if <CODE>c</CODE>is any character for which either<A HREF="#isalnum"><CODE>isalnum</CODE></A> or<A HREF="#ispunct"><CODE>ispunct</CODE></A> returns nonzero.</P><H2><A NAME="islower"><CODE>islower</CODE></A></H2><PRE>int <B>islower</B>(int c);</PRE><P>The function returns nonzero if <CODE>c</CODE> is any of:</P><PRE>a b c d e f g h i j k l m n o p q r s t u v w x y z</PRE><P>or any other locale-specific lowercase character.</P><H2><A NAME="isprint"><CODE>isprint</CODE></A></H2><PRE>int <B>isprint</B>(int c);</PRE><P>The function returns nonzero if <CODE>c</CODE> is<CODE><I>space</I></CODE> or a character for which<A HREF="#isgraph"><CODE>isgraph</CODE></A> returns nonzero.</P><H2><A NAME="ispunct"><CODE>ispunct</CODE></A></H2><PRE>int <B>ispunct</B>(int c);</PRE><P>The function returns nonzero if <CODE>c</CODE> is any of:</P><PRE>! " # % &amp; ' ( ) ; &lt;= &gt; ? [ \ ] * + , -. / : ^ _ { | } ~</PRE><P>or any other implementation-defined punctuation character.</P><H2><A NAME="isspace"><CODE>isspace</CODE></A></H2><PRE>int <B>isspace</B>(int c);</PRE><P>The function returns nonzero if <CODE>c</CODE> is any of:</P><PRE><I>CR FF HT NL VT space</I></PRE><P>or any other locale-specific space character.</P><H2><A NAME="isupper"><CODE>isupper</CODE></A></H2><PRE>int <B>isupper</B>(int c);</PRE><P>The function returns nonzero if <CODE>c</CODE> is any of:</P><PRE>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</PRE><P>or any other locale-specific uppercase character.</P><H2><A NAME="isxdigit"><CODE>isxdigit</CODE></A></H2><PRE>int <B>isxdigit</B>(int c);</PRE><P>The function returns nonzero if <CODE>c</CODE> is any of:</P><PRE>0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F</PRE><H2><A NAME="tolower"><CODE>tolower</CODE></A></H2><PRE>int <B>tolower</B>(int c);</PRE><P>The function returns the corresponding lowercase letter if oneexists and if<CODE><A HREF="#isupper">isupper</A>(c)</CODE>;otherwise, it returns <CODE>c</CODE>.</P><H2><A NAME="toupper"><CODE>toupper</CODE></A></H2><PRE>int <B>toupper</B>(int c);</PRE><P>The function returns the corresponding uppercase letter if oneexists and if<CODE><A HREF="#islower">islower</A>(c)</CODE>;otherwise, it returns <CODE>c</CODE>.</P><HR><P>See also the<B><A HREF="index.html#Table of Contents">Table of Contents</A></B> and the<B><A HREF="_index.html">Index</A></B>.</P><P><I><A HREF="crit_pb.html">Copyright</A> &#169; 1989-2002by P.J. Plauger and Jim Brodie. All rights reserved.</I></P><!--V4.01:1125--></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -