?? unicode.sgml
字號:
<refsect2><title><anchor id="g-unichar-isgraph">g_unichar_isgraph ()</title><programlisting><link linkend="gboolean">gboolean</link> g_unichar_isgraph (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Determines whether a character is printable and not a space(returns <literal>FALSE</literal> for control characters, format characters, andspaces). <link linkend="g-unichar-isprint">g_unichar_isprint</link>() is similar, but returns <literal>TRUE</literal> forspaces. Given some UTF-8 text, obtain a character value with<link linkend="g-utf8-get-char">g_utf8_get_char</link>().</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if <parameter>c</parameter> is printable unless it's a space</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-unichar-islower">g_unichar_islower ()</title><programlisting><link linkend="gboolean">gboolean</link> g_unichar_islower (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Determines whether a character is a lowercase letter.Given some UTF-8 text, obtain a character value with<link linkend="g-utf8-get-char">g_utf8_get_char</link>().</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if <parameter>c</parameter> is a lowercase letter</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-unichar-isprint">g_unichar_isprint ()</title><programlisting><link linkend="gboolean">gboolean</link> g_unichar_isprint (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Determines whether a character is printable.Unlike <link linkend="g-unichar-isgraph">g_unichar_isgraph</link>(), returns <literal>TRUE</literal> for spaces.Given some UTF-8 text, obtain a character value with<link linkend="g-utf8-get-char">g_utf8_get_char</link>().</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if <parameter>c</parameter> is printable</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-unichar-ispunct">g_unichar_ispunct ()</title><programlisting><link linkend="gboolean">gboolean</link> g_unichar_ispunct (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Determines whether a character is punctuation or a symbol.Given some UTF-8 text, obtain a character value with<link linkend="g-utf8-get-char">g_utf8_get_char</link>().</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if <parameter>c</parameter> is a punctuation or symbol character</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-unichar-isspace">g_unichar_isspace ()</title><programlisting><link linkend="gboolean">gboolean</link> g_unichar_isspace (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Determines whether a character is a space, tab, or line separator(newline, carriage return, etc.). Given some UTF-8 text, obtain acharacter value with <link linkend="g-utf8-get-char">g_utf8_get_char</link>().</para><para>(Note: don't use this to do word breaking; you have to usePango or equivalent to get word breaking right, the algorithmis fairly complex.)</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if <parameter>c</parameter> is a punctuation character</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-unichar-isupper">g_unichar_isupper ()</title><programlisting><link linkend="gboolean">gboolean</link> g_unichar_isupper (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Determines if a character is uppercase.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if <parameter>c</parameter> is an uppercase character</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-unichar-isxdigit">g_unichar_isxdigit ()</title><programlisting><link linkend="gboolean">gboolean</link> g_unichar_isxdigit (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Determines if a character is a hexidecimal digit.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the character is a hexadecimal digit</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-unichar-istitle">g_unichar_istitle ()</title><programlisting><link linkend="gboolean">gboolean</link> g_unichar_istitle (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Determines if a character is titlecase. Some characters inUnicode which are composites, such as the DZ digraphhave three case variants instead of just two. The titlecaseform is used at the beginning of a word where only thefirst letter is capitalized. The titlecase form of the DZdigraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the character is titlecase</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-unichar-isdefined">g_unichar_isdefined ()</title><programlisting><link linkend="gboolean">gboolean</link> g_unichar_isdefined (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Determines if a given character is assigned in the Unicodestandard.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the character has an assigned value</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-unichar-iswide">g_unichar_iswide ()</title><programlisting><link linkend="gboolean">gboolean</link> g_unichar_iswide (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Determines if a character is typically rendered in a double-widthcell.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the character is wide</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-unichar-toupper">g_unichar_toupper ()</title><programlisting><link linkend="gunichar">gunichar</link> g_unichar_toupper (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Converts a character to uppercase.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the result of converting <parameter>c</parameter> to uppercase. If <parameter>c</parameter> is not an lowercase or titlecase character, or has no upper case equivalent <parameter>c</parameter> is returned unchanged.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-unichar-tolower">g_unichar_tolower ()</title><programlisting><link linkend="gunichar">gunichar</link> g_unichar_tolower (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Converts a character to lower case.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the result of converting <parameter>c</parameter> to lower case. If <parameter>c</parameter> is not an upperlower or titlecase character, or has no lowercase equivalent <parameter>c</parameter> is returned unchanged.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-unichar-totitle">g_unichar_totitle ()</title><programlisting><link linkend="gunichar">gunichar</link> g_unichar_totitle (<link linkend="gunichar">gunichar</link> c);</programlisting><para>Converts a character to the titlecase.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>c</parameter> :</entry><entry> a Unicode character</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the result of converting <parameter>c</parameter> to titlecase. If <parameter>c</parameter> is not an uppercase or lowercase character, <parameter>c</parameter> is returned unchanged.</entry></row>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -