summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/en/dev/plugin_c_api.en.xml36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/en/dev/plugin_c_api.en.xml b/doc/en/dev/plugin_c_api.en.xml
index 3b35e5713..f4eb5b150 100644
--- a/doc/en/dev/plugin_c_api.en.xml
+++ b/doc/en/dev/plugin_c_api.en.xml
@@ -1545,6 +1545,42 @@ char *weechat_utf8_pos (const char *string, int real_pos);
</para>
</section>
+ <section id="secPluginCApi_weechat_utf8_strndup">
+ <title>weechat_utf8_strndup</title>
+
+ <para>
+ Prototype:
+<programlisting>
+char *weechat_utf8_strndup (const char *string, int max_chars);
+</programlisting>
+ </para>
+ <para>
+ Return duplicate string, with max N chars.
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>string</option>: string
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>max_chars</option>: max chars
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Return value: duplicated string, NULL if error.
+ </para>
+ <para>
+ Example:
+ <screen>char *string = weechat_utf8_strndup ("chĂȘne", 3); /* returns "chĂȘ" */</screen>
+ </para>
+ </section>
+
</section>
<!-- ===========================[ directories ]========================== -->