summaryrefslogtreecommitdiff
path: root/doc/en/dev
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-03-18 18:02:48 +0100
committerSebastien Helleu <flashcode@flashtux.org>2009-03-18 18:02:48 +0100
commita394ed5d6fcb54970d5453de02ce228c35ddd9bb (patch)
tree1f898f7982bb8ca0479470ecd64246114efb5d76 /doc/en/dev
parent5f243ddd8690adeab4cc4511deb46319ca071234 (diff)
downloadweechat-a394ed5d6fcb54970d5453de02ce228c35ddd9bb.zip
Add "replacement" argument for string_remove_color in plugin API
Diffstat (limited to 'doc/en/dev')
-rw-r--r--doc/en/dev/plugin_c_api.en.xml47
1 files changed, 47 insertions, 0 deletions
diff --git a/doc/en/dev/plugin_c_api.en.xml b/doc/en/dev/plugin_c_api.en.xml
index f707a2bcf..8f2530720 100644
--- a/doc/en/dev/plugin_c_api.en.xml
+++ b/doc/en/dev/plugin_c_api.en.xml
@@ -1099,6 +1099,53 @@ if (str)
</para>
</section>
+ <section id="secPluginCApi_weechat_string_remove_color">
+ <title>weechat_string_remove_color</title>
+
+ <para>
+ Prototype:
+<programlisting>
+char *weechat_string_remove_color (const char *string, const char *replacement);
+</programlisting>
+ </para>
+ <para>
+ Remove WeeChat colors from a string.
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>string</option>: string
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>replacement</option>: if not NULL and not empty, WeeChat
+ color codes are replaced by first char of this string, otherwise
+ WeeChat color codes and following chars (if related to color) are
+ removed from string
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Return value: string without color.
+ </para>
+ <note>
+ <para>
+ Result has to be free by a call to "free" after use.
+ </para>
+ </note>
+ <para>
+ Example:
+<screen>
+char *str1 = weechat_string_remove_color (my_string1, NULL); /* remove colors and related chars */
+char *str2 = weechat_string_remove_color (my_string2, "?"); /* replace color codes by "?" */
+</screen>
+ </para>
+ </section>
+
</section>
<!-- ==============================[ UTF-8 ]============================= -->