summaryrefslogtreecommitdiff
path: root/doc/en/weechat_plugin_api.en.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/en/weechat_plugin_api.en.txt')
-rw-r--r--doc/en/weechat_plugin_api.en.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt
index df447f3d8..6c5d3b518 100644
--- a/doc/en/weechat_plugin_api.en.txt
+++ b/doc/en/weechat_plugin_api.en.txt
@@ -1108,6 +1108,33 @@ str = weechat.string_remove_color(string, replacement)
str = weechat.string_remove_color(my_string, "?")
----------------------------------------
+weechat_string_encode_base64
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Encode a string in base64.
+
+Prototype:
+
+[source,C]
+----------------------------------------
+void weechat_string_encode_base64 (const char *from, int length, char *to);
+----------------------------------------
+
+Arguments:
+
+* 'from': string to encode
+* 'length': length of string to encode (for example `strlen(from)`)
+* 'to': pointer to string to store result (must be long enough)
+
+Example:
+
+[source,C]
+----------------------------------------
+char *string = "abcdefgh", result[128];
+weechat_string_encode_base64 (string, strlen (string), result);
+/* result == "YWJjZGVmZ2g=" */
+----------------------------------------
+
[[utf-8]]
UTF-8
~~~~~