glib-unicode-manipulation.html
来自「最新gtk中文资料集」· HTML 代码 · 共 1,149 行 · 第 1/5 页
HTML
1,149 行
<a name="id3002169"></a><h3><a name="g-unichar-iswide-cjk"></a>g_unichar_iswide_cjk ()</h3><a class="indexterm" name="id3002185"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> g_unichar_iswide_cjk (<a class="link" href="glib-Unicode-Manipulation.html#gunichar">gunichar</a> c);</pre><p>Determines if a character is typically rendered in a double-widthcell under legacy East Asian locales. If a character is wide according to<a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iswide"><code class="function">g_unichar_iswide()</code></a>, then it is also reported wide with this function, butthe converse is not necessarily true. See the<a class="ulink" href="http://www.unicode.org/reports/tr11/" target="_top">Unicode StandardAnnex <span class="type">11</span></a> for details.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td><td> a Unicode character</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the character is wide in legacy East Asian locales</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id3002292"></a><h3><a name="g-unichar-iszerowidth"></a>g_unichar_iszerowidth ()</h3><a class="indexterm" name="id3002307"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> g_unichar_iszerowidth (<a class="link" href="glib-Unicode-Manipulation.html#gunichar">gunichar</a> c);</pre><p>Determines if a given character typically takes zero width when rendered.The return value is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for all non-spacing and enclosing marks(e.g., combining accents), format characters, zero-widthspace, but not U+00AD SOFT HYPHEN.</p><p>A typical use of this function is with one of <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iswide"><code class="function">g_unichar_iswide()</code></a> or<a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iswide-cjk"><code class="function">g_unichar_iswide_cjk()</code></a> to determine the number of cells a string occupieswhen displayed on a grid display (terminals). However, note that not allterminals support zero-width rendering of zero-width marks.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td><td> a Unicode character</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the character has zero width</td></tr></tbody></table></div><p class="since">Since 2.14</p></div><hr><div class="refsect2" lang="en"><a name="id3002428"></a><h3><a name="g-unichar-toupper"></a>g_unichar_toupper ()</h3><a class="indexterm" name="id3002441"></a><pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar">gunichar</a> g_unichar_toupper (<a class="link" href="glib-Unicode-Manipulation.html#gunichar">gunichar</a> c);</pre><p>Converts a character to uppercase.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td><td> a Unicode character</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the result of converting <em class="parameter"><code>c</code></em> to uppercase. If <em class="parameter"><code>c</code></em> is not an lowercase or titlecase character, or has no upper case equivalent <em class="parameter"><code>c</code></em> is returned unchanged.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3002521"></a><h3><a name="g-unichar-tolower"></a>g_unichar_tolower ()</h3><a class="indexterm" name="id3002534"></a><pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar">gunichar</a> g_unichar_tolower (<a class="link" href="glib-Unicode-Manipulation.html#gunichar">gunichar</a> c);</pre><p>Converts a character to lower case.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td><td> a Unicode character.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the result of converting <em class="parameter"><code>c</code></em> to lower case. If <em class="parameter"><code>c</code></em> is not an upperlower or titlecase character, or has no lowercase equivalent <em class="parameter"><code>c</code></em> is returned unchanged.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3002614"></a><h3><a name="g-unichar-totitle"></a>g_unichar_totitle ()</h3><a class="indexterm" name="id3002627"></a><pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar">gunichar</a> g_unichar_totitle (<a class="link" href="glib-Unicode-Manipulation.html#gunichar">gunichar</a> c);</pre><p>Converts a character to the titlecase.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td><td> a Unicode character</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the result of converting <em class="parameter"><code>c</code></em> to titlecase. If <em class="parameter"><code>c</code></em> is not an uppercase or lowercase character, <em class="parameter"><code>c</code></em> is returned unchanged.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3002707"></a><h3><a name="g-unichar-digit-value"></a>g_unichar_digit_value ()</h3><a class="indexterm" name="id3002720"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a> g_unichar_digit_value (<a class="link" href="glib-Unicode-Manipulation.html#gunichar">gunichar</a> c);</pre><p>Determines the numeric value of a character as a decimaldigit.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td><td> a Unicode character</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> If <em class="parameter"><code>c</code></em> is a decimal digit (according to<a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isdigit"><code class="function">g_unichar_isdigit()</code></a>), its numeric value. Otherwise, -1.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3002799"></a><h3><a name="g-unichar-xdigit-value"></a>g_unichar_xdigit_value ()</h3><a class="indexterm" name="id3002812"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a> g_unichar_xdigit_value (<a class="link" href="glib-Unicode-Manipulation.html#gunichar">gunichar</a> c);</pre><p>Determines the numeric value of a character as a hexidecimaldigit.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td><td> a Unicode character</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> If <em class="parameter"><code>c</code></em> is a hex digit (according to<a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isxdigit"><code class="function">g_unichar_isxdigit()</code></a>), its numeric value. Otherwise, -1.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3002891"></a><h3><a name="GUnicodeType"></a>enum GUnicodeType</h3><a class="indexterm" name="id3002904"></a><pre class="programlisting">typedef enum{ G_UNICODE_CONTROL, G_UNICODE_FORMAT, G_UNICODE_UNASSIGNED, G_UNICODE_PRIVATE_USE, G_UNICODE_SURROGATE, G_UNICODE_LOWERCASE_LETTER, G_UNICODE_MODIFIER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_TITLECASE_LETTER, G_UNICODE_UPPERCASE_LETTER, G_UNICODE_COMBINING_MARK, G_UNICODE_ENCLOSING_MARK, G_UNICODE_NON_SPACING_MARK, G_UNICODE_DECIMAL_NUMBER,
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?