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

📄 wctype.html

📁 ST20 Embedded Toolset R2.0.5用于开发基于ST20芯片机顶盒软件的开发平台,2.0.5版本,国内找不到的.在国外论坛上花了N天才找到!
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<HTML><HEAD><TITLE>&lt;wctype.h&gt;</TITLE></HEAD><BODY><H1><A NAME="&lt;wctype.h&gt;"><CODE>&lt;wctype.h&gt;</CODE></A></H1><P>[Added with<A HREF="lib_over.html#Amendment 1">Amendment 1</A>]</P><HR><P><B><CODE><A HREF="#iswalnum">iswalnum</A>&#183; <A HREF="#iswalpha">iswalpha</A>&#183; <A HREF="#iswcntrl">iswcntrl</A>&#183; <A HREF="#iswdigit">iswdigit</A>&#183; <A HREF="#iswgraph">iswgraph</A>&#183; <A HREF="#iswlower">iswlower</A>&#183; <A HREF="#iswprint">iswprint</A>&#183; <A HREF="#iswpunct">iswpunct</A>&#183; <A HREF="#iswspace">iswspace</A>&#183; <A HREF="#iswupper">iswupper</A>&#183; <A HREF="#iswxdigit">iswxdigit</A>&#183; <A HREF="#towlower">towlower</A>&#183; <A HREF="#towctrans">towctrans</A>&#183; <A HREF="#towupper">towupper</A>&#183; <A HREF="#wctrans">wctrans</A>&#183; <A HREF="#wctype">wctype</A></CODE></B></P><HR><P>Include the standard header <B><CODE>&lt;wctype.h&gt;</CODE></B>to declare several functions that are usefulfor classifying and mapping codes from the target wide-character set.</P><P>Every function that has a parameter of type<A HREF="#wint_t"><CODE>wint_t</CODE></A>can accept the value of the macro<A HREF="#WEOF"><CODE>WEOF</CODE></A>or any valid wide-character code (of type<A HREF="stddef.html#wchar_t"><CODE>wchar_t</CODE></A>).Thus, the argument can be the value returned by any of the functions:<A HREF="wchar.html#btowc"><CODE>btowc</CODE></A>,<A HREF="wchar.html#fgetwc"><CODE>fgetwc</CODE></A>,<A HREF="wchar.html#fputwc"><CODE>fputwc</CODE></A>,<A HREF="wchar.html#getwc"><CODE>getwc</CODE></A>,<A HREF="wchar.html#getwchar"><CODE>getwchar</CODE></A>,<A HREF="wchar.html#putwc"><CODE>putwc</CODE></A>,<A HREF="wchar.html#putwchar"><CODE>putwchar</CODE></A>,<A HREF="#towctrans"><CODE>towctrans</CODE></A>,<A HREF="#towlower"><CODE>towlower</CODE></A>,<A HREF="#towupper"><CODE>towupper</CODE></A>, or<A HREF="wchar.html#ungetwc"><CODE>ungetwc</CODE></A>.You must not call these functionswith other wide-character argument values.</P><P>The<B><A NAME="wide-character classification">wide-character classification</A></B>functions are strongly related to the (byte)<A HREF="ctype.html#character classification">character classification</A>functions. Each function <CODE>is<I>XXX</I></CODE>has a corresponding wide-character classificationfunction <CODE>isw<I>XXX</I></CODE>.Moreover, the wide-character classification functionsare interrelated much the same way as their correspondingbyte functions, with two added provisos:</P><UL><LI>The function<A HREF="#iswprint"><CODE>iswprint</CODE></A>, unlike<A HREF="ctype.html#isprint"><CODE>isprint</CODE></A>,can return a nonzero value for additional space charactersbesides the wide-character equivalent of <CODE><I>space</I></CODE>(<CODE>L' '</CODE>). Any such additional charactersreturn a nonzero value for<A HREF="#iswspace"><CODE>iswspace</CODE></A> and return zero for<A HREF="#iswgraph"><CODE>iswgraph</CODE></A> or<A HREF="#iswpunct"><CODE>iswpunct</CODE></A>.<LI>The characters in each wide-character class are a superset ofthe characters in the corresponding byte class.If the call <CODE>is<I>XXX</I>(c)</CODE> returns a nonzero value,then the corresponding call <CODE>isw<I>XXX</I>(btowc(c))</CODE>also returns a nonzero value.</UL><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="#iswcntrl"><CODE>iswcntrl</CODE></A>(provided the characters cause<A HREF="#iswprint"><CODE>iswprint</CODE></A> to return zero)</LI><LI><A HREF="#iswpunct"><CODE>iswpunct</CODE></A>(provided the characters cause<A HREF="#iswalnum"><CODE>iswalnum</CODE></A> to return zero)</LI></UL><P>Moreover, a<A HREF="locale.html#locale">locale</A> other than the<A HREF="locale.html#C locale"><CODE>"C"</CODE></A> locale can defineadditional characters for:</P><UL><LI><A HREF="#iswalpha"><CODE>iswalpha</CODE></A>,<A HREF="#iswupper"><CODE>iswupper</CODE></A>, and<A HREF="#iswlower"><CODE>iswlower</CODE></A>(provided the characters cause<A HREF="#iswcntrl"><CODE>iswcntrl</CODE></A>,<A HREF="#iswdigit"><CODE>iswdigit</CODE></A>,<A HREF="#iswpunct"><CODE>iswpunct</CODE></A>, and<A HREF="#iswspace"><CODE>iswspace</CODE></A> to return zero)</LI><LI><A HREF="#iswspace"><CODE>iswspace</CODE></A>(provided the characters cause<A HREF="#iswpunct"><CODE>iswpunct</CODE></A> to return zero)</LI></UL><P>Note that the last rule differs slightly from the correspondingrule for the function<A HREF="ctype.html#isspace"><CODE>isspace</CODE></A>,as indicated above.Note also that an implementation can define a<A HREF="locale.html#locale">locale</A> other than the<A HREF="locale.html#C locale"><CODE>"C"</CODE></A> localein which a character can cause<A HREF="#iswalpha"><CODE>iswalpha</CODE></A> (and hence<A HREF="#iswalnum"><CODE>iswalnum</CODE></A>)to return nonzero, yet still cause<A HREF="#iswupper"><CODE>iswupper</CODE></A> and<A HREF="#iswlower"><CODE>iswlower</CODE></A> to return zero.</P><H2><A NAME="WEOF"><CODE>WEOF</CODE></A></H2><PRE>#define <B>WEOF</B> <I>&lt;</I>wint_t <I>constant expression&gt;</I></PRE><P>The macro yields the return value, of type<A HREF="#wint_t"><CODE>wint_t</CODE></A>,used to signal the end of a<A HREF="lib_file.html#wide stream">wide stream</A>or to report an error condition.</P><PRE>    /* TYPES */typedef <I>s_type</I> <A HREF="#wctrans_t"><B>wctrans_t</B></A>;typedef <I>s_type</I> <A HREF="#wctype_t"><B>wctype_t</B></A>;typedef <I>i_type</I> <A HREF="#wint_t"><B>wint_t</B></A>;    /* FUNCTIONS */int <A HREF="#iswalnum"><B>iswalnum</B></A>(wint_t c);int <A HREF="#iswalpha"><B>iswalpha</B></A>(wint_t c);int <A HREF="#iswcntrl"><B>iswcntrl</B></A>(wint_t c);int <A HREF="#iswctype"><B>iswctype</B></A>(wint_t c, wctype_t category);int <A HREF="#iswdigit"><B>iswdigit</B></A>(wint_t c);int <A HREF="#iswgraph"><B>iswgraph</B></A>(wint_t c);int <A HREF="#iswlower"><B>iswlower</B></A>(wint_t c);int <A HREF="#iswprint"><B>iswprint</B></A>(wint_t c);int <A HREF="#iswpunct"><B>iswpunct</B></A>(wint_t c);int <A HREF="#iswspace"><B>iswspace</B></A>(wint_t c);int <A HREF="#iswupper"><B>iswupper</B></A>(wint_t c);int <A HREF="#iswxdigit"><B>iswxdigit</B></A>(wint_t c);wint_t <A HREF="#towctrans"><B>towctrans</B></A>(wint_t c, wctrans_t category);wint_t <A HREF="#towlower"><B>towlower</B></A>(wint_t c);wint_t <A HREF="#towupper"><B>towupper</B></A>(wint_t c);wctrans_t <A HREF="#wctrans"><B>wctrans</B></A>(const char *property);wctype_t <A HREF="#wctype"><B>wctype</B></A>(const char *property);</PRE><H2><A NAME="iswalnum"><CODE>iswalnum</CODE></A></H2><PRE>int <B>iswalnum</B>(wint_t 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="iswalpha"><CODE>iswalpha</CODE></A></H2><PRE>int <B>iswalpha</B>(wint_t 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="iswcntrl"><CODE>iswcntrl</CODE></A></H2><PRE>int <B>iswcntrl</B>(wint_t 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="iswctype"><CODE>iswctype</CODE></A></H2><PRE>int <B>iswctype</B>(wint_t c, wctype_t category);</PRE><P>The function returns nonzero if <CODE>c</CODE> is any character inthe category <CODE>category</CODE>.The value of <CODE>category</CODE> must havebeen returned by an earlier successful call to

⌨️ 快捷键说明

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