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

📄 strings.sgml

📁 GLib是GTK+和GNOME工程的基础底层核心程序库
💻 SGML
📖 第 1 页 / 共 3 页
字号:
<refsect2><title><anchor id="g-string-append-printf">g_string_append_printf ()</title><programlisting>void        g_string_append_printf          (<link linkend="GString">GString</link> *string,                                             const <link linkend="gchar">gchar</link> *format,                                             ...);</programlisting><para>Appends a formatted string onto the end of a <link linkend="GString">GString</link>.This function is is similar to <link linkend="g-string-printf">g_string_printf</link>() except thatthe text is appended to the <link linkend="GString">GString</link>.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>string</parameter>&nbsp;:</entry><entry>a <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><parameter>format</parameter>&nbsp;:</entry><entry>the string format. See the <function>printf()</function>documentation.</entry></row><row><entry align="right"><parameter>...</parameter>&nbsp;:</entry><entry>the parameters to insert into the format string.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-string-append">g_string_append ()</title><programlisting><link linkend="GString">GString</link>*    g_string_append                 (<link linkend="GString">GString</link> *string,                                             const <link linkend="gchar">gchar</link> *val);</programlisting><para>Adds a string onto the end of a <link linkend="GString">GString</link>, expanding it if necessary.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>string</parameter>&nbsp;:</entry><entry>a <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>the string to append onto the end of the <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the <link linkend="GString">GString</link>.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-string-append-c">g_string_append_c ()</title><programlisting><link linkend="GString">GString</link>*    g_string_append_c               (<link linkend="GString">GString</link> *string,                                             <link linkend="gchar">gchar</link> c);</programlisting><para>Adds a character onto the end of a <link linkend="GString">GString</link>, expanding it if necessary.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>string</parameter>&nbsp;:</entry><entry>a <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><parameter>c</parameter>&nbsp;:</entry><entry>the character to append onto the end of the <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the <link linkend="GString">GString</link>.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-string-append-unichar">g_string_append_unichar ()</title><programlisting><link linkend="GString">GString</link>*    g_string_append_unichar         (<link linkend="GString">GString</link> *string,                                             <link linkend="gunichar">gunichar</link> wc);</programlisting><para>Converts a Unicode character into UTF-8, and appends itto the string.</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>string</parameter>&nbsp;:</entry><entry> a <link linkend="GString">GString</link></entry></row><row><entry align="right"><parameter>wc</parameter>&nbsp;:</entry><entry> a Unicode character</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <parameter>string</parameter></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-string-append-len">g_string_append_len ()</title><programlisting><link linkend="GString">GString</link>*    g_string_append_len             (<link linkend="GString">GString</link> *string,                                             const <link linkend="gchar">gchar</link> *val,                                             <link linkend="gssize">gssize</link> len);</programlisting><para>Appends <parameter>len</parameter> bytes of <parameter>val</parameter> to <parameter>string</parameter>. Because <parameter>len</parameter> is provided, <parameter>val</parameter> may contain embedded nuls and need not be nul-terminated.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>string</parameter>&nbsp;:</entry><entry>a <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>bytes to append.</entry></row><row><entry align="right"><parameter>len</parameter>&nbsp;:</entry><entry>number of bytes of <parameter>val</parameter> to use.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the <link linkend="GString">GString</link>.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-string-prepend">g_string_prepend ()</title><programlisting><link linkend="GString">GString</link>*    g_string_prepend                (<link linkend="GString">GString</link> *string,                                             const <link linkend="gchar">gchar</link> *val);</programlisting><para>Adds a string on to the start of a <link linkend="GString">GString</link>, expanding it if necessary.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>string</parameter>&nbsp;:</entry><entry>a <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>the string to prepend on the start of the <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the <link linkend="GString">GString</link>.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-string-prepend-c">g_string_prepend_c ()</title><programlisting><link linkend="GString">GString</link>*    g_string_prepend_c              (<link linkend="GString">GString</link> *string,                                             <link linkend="gchar">gchar</link> c);</programlisting><para>Adds a character onto the start of a <link linkend="GString">GString</link>, expanding it if necessary.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>string</parameter>&nbsp;:</entry><entry>a <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><parameter>c</parameter>&nbsp;:</entry><entry>the character to prepend on the start of the <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the <link linkend="GString">GString</link>.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-string-prepend-unichar">g_string_prepend_unichar ()</title><programlisting><link linkend="GString">GString</link>*    g_string_prepend_unichar        (<link linkend="GString">GString</link> *string,                                             <link linkend="gunichar">gunichar</link> wc);</programlisting><para>Converts a Unicode character into UTF-8, and prepends itto the string.</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>string</parameter>&nbsp;:</entry><entry> a <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><parameter>wc</parameter>&nbsp;:</entry><entry> a Unicode character.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <parameter>string</parameter>.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-string-prepend-len">g_string_prepend_len ()</title><programlisting><link linkend="GString">GString</link>*    g_string_prepend_len            (<link linkend="GString">GString</link> *string,                                             const <link linkend="gchar">gchar</link> *val,                                             <link linkend="gssize">gssize</link> len);</programlisting><para>Prepends <parameter>len</parameter> bytes of <parameter>val</parameter> to <parameter>string</parameter>. Because <parameter>len</parameter> is provided, <parameter>val</parameter> may contain embedded nuls and need not be nul-terminated.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>string</parameter>&nbsp;:</entry><entry>a <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>bytes to prepend.</entry></row><row><entry align="right"><parameter>len</parameter>&nbsp;:</entry><entry>number of bytes in <parameter>val</parameter> to prepend.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the <link linkend="GString">GString</link> passed in.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-string-insert">g_string_insert ()</title><programlisting><link linkend="GString">GString</link>*    g_string_insert                 (<link linkend="GString">GString</link> *string,                                             <link linkend="gssize">gssize</link> pos,                                             const <link linkend="gchar">gchar</link> *val);</programlisting><para>Inserts a copy of a string into a <link linkend="GString">GString</link>, expanding it if necessary.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>string</parameter>&nbsp;:</entry><entry>a <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><parameter>pos</parameter>&nbsp;:</entry><entry>the position to insert the copy of the string.</entry></row><row><entry align="right"><parameter>val</parameter>&nbsp;:</entry><entry>the string to insert.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the <link linkend="GString">GString</link>.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-string-insert-c">g_string_insert_c ()</title><programlisting><link linkend="GString">GString</link>*    g_string_insert_c               (<link linkend="GString">GString</link> *string,                                             <link linkend="gssize">gssize</link> pos,                                             <link linkend="gchar">gchar</link> c);</programlisting><para>Inserts a character into a <link linkend="GString">GString</link>, expanding it if necessary.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>string</parameter>&nbsp;:</entry><entry>a <link linkend="GString">GString</link>.</entry></row><row><entry align="right"><parameter>pos</parameter>&nbsp;:</entry><entry>the position to insert the character.</entry></row><row><entry align="right"><parameter>c</parameter>&nbsp;:</entry>

⌨️ 快捷键说明

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