summaryrefslogtreecommitdiff
path: root/doc/en
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-11-02 14:09:23 +0100
committerSébastien Helleu <flashcode@flashtux.org>2018-11-02 14:09:23 +0100
commit8848b0e22aaba6f3d7116c7137ede3b43f393a85 (patch)
tree65ffb8531d608f899bffcd47bc8721ec059cdc26 /doc/en
parent74a17d821f066c41f1450e9fae805c1711482265 (diff)
downloadweechat-8848b0e22aaba6f3d7116c7137ede3b43f393a85.zip
api: return integer in function string_encode_base64
Diffstat (limited to 'doc/en')
-rw-r--r--doc/en/weechat_plugin_api.en.adoc13
1 files changed, 9 insertions, 4 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index 056e97c22..9ecbc9b81 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -1780,7 +1780,7 @@ str = weechat.string_remove_color(my_string, "?")
==== string_encode_base64
-_WeeChat ≥ 0.3.2._
+_WeeChat ≥ 0.3.2, updated in 2.4._
Encode a string in base64.
@@ -1788,7 +1788,7 @@ Prototype:
[source,C]
----
-void weechat_string_encode_base64 (const char *from, int length, char *to);
+int weechat_string_encode_base64 (const char *from, int length, char *to);
----
Arguments:
@@ -1798,13 +1798,18 @@ Arguments:
* _to_: pointer to string to store result (must be long enough, result is
longer than initial string)
+Return value:
+
+* length of string stored in _*to_ (does not count final _\0_)
+
C example:
[source,C]
----
char *string = "abcdefgh", result[128];
-weechat_string_encode_base64 (string, strlen (string), result);
-/* result == "YWJjZGVmZ2g=" */
+int length;
+length = weechat_string_encode_base64 (string, strlen (string), result);
+/* length == 12, result == "YWJjZGVmZ2g=" */
----
[NOTE]