diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2018-11-02 14:09:23 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2018-11-02 14:09:23 +0100 |
commit | 8848b0e22aaba6f3d7116c7137ede3b43f393a85 (patch) | |
tree | 65ffb8531d608f899bffcd47bc8721ec059cdc26 /doc | |
parent | 74a17d821f066c41f1450e9fae805c1711482265 (diff) | |
download | weechat-8848b0e22aaba6f3d7116c7137ede3b43f393a85.zip |
api: return integer in function string_encode_base64
Diffstat (limited to 'doc')
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 13 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 13 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 14 | ||||
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.adoc | 14 |
4 files changed, 38 insertions, 16 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] diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index c2a6815a2..5f3181dac 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -1814,7 +1814,7 @@ str = weechat.string_remove_color(ma_chaine, "?") ==== string_encode_base64 -_WeeChat ≥ 0.3.2._ +_WeeChat ≥ 0.3.2, mis à jour dans la 2.4._ Encoder une chaîne en base64. @@ -1822,7 +1822,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); ---- Paramètres : @@ -1832,13 +1832,18 @@ Paramètres : * _to_ : pointeur vers la chaîne pour stocker le résultat (doit être suffisamment long, le résultat est plus long que la chaîne initiale) +Valeur de retour : + +* longueur de la chaîne stockée dans _*to_ (ne compte pas le _\0_ final) + Exemple en C : [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] diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index d8cd71367..a0dd0988b 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -1853,7 +1853,8 @@ str = weechat.string_remove_color(my_string, "?") ==== string_encode_base64 -_WeeChat ≥ 0.3.2._ +// TRANSLATION MISSING +_WeeChat ≥ 0.3.2, updated in 2.4._ Codifica una stringa in base64. @@ -1861,7 +1862,7 @@ Prototipo: [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); ---- Argomenti: @@ -1871,13 +1872,18 @@ Argomenti: * _to_: puntatore alla stringa per memorizzare il risultato (deve essere sufficientemente lunga, il risultato è più lungo della stringa iniziale) +Valore restituito: + +* lunghezza della stringa memorizzata in _*to_ (lo _\0_ finale non conta) + Esempio in C: [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] diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index c2067916e..5ac11dfee 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -1786,7 +1786,8 @@ str = weechat.string_remove_color(my_string, "?") ==== string_encode_base64 -_WeeChat バージョン 0.3.2 以上で利用可。_ +// TRANSLATION MISSING +_WeeChat ≥ 0.3.2, updated in 2.4._ 文字列を base64 でエンコード。 @@ -1794,7 +1795,7 @@ _WeeChat バージョン 0.3.2 以上で利用可。_ [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); ---- 引数: @@ -1804,13 +1805,18 @@ void weechat_string_encode_base64 (const char *from, int length, char *to); * _to_: エンコード結果を保存する文字列へのポインタ (十分な領域を確保してください、結果はエンコード元文字列よりも長くなります) +戻り値: + +* _*to_ に保存された文字列の長さ (最後の _\0_ は数えません) + C 言語での使用例: [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] |