diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-10-03 20:07:08 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-11-05 22:34:38 +0100 |
commit | bc2fb071e22589aa219ce551b0112bacbd3cca8f (patch) | |
tree | 46885363dbf95737baf92331f6187ecefce55d4a /doc/it | |
parent | 03899e5ea5ed408d334c203ff535d02d1a8b5b4a (diff) | |
download | weechat-bc2fb071e22589aa219ce551b0112bacbd3cca8f.zip |
api: add function string_translate_chars
Diffstat (limited to 'doc/it')
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 78cf72caa..14c509a51 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -1665,6 +1665,48 @@ if (weechat_string_regcomp (&my_regex, "([0-9]{4})-([0-9]{2})-([0-9]{2})", [NOTE] Questa funzione non è disponibile nelle API per lo scripting. +==== string_translate_chars + +_WeeChat ≥ 3.8._ + +// TRANSLATION MISSING +Translate chars in a string. + +Prototipo: + +[source,c] +---- +char *string_translate_chars (const char *string, const char *chars1, const char *chars2); +---- + +Argomenti: + +// TRANSLATION MISSING +* _string_: string +* _chars1_: string with chars to translate +* _chars2_: string with replacement chars; it must contain the same number of + UTF-8 chars than _chars1_ + +Valore restituito: + +// TRANSLATION MISSING +* string with translated chars, NULL if problem (must be freed by calling "free" + after use) + +Esempi in C: + +[source,c] +---- +/* "test" => "tEst" */ +char *str = weechat_string_translate_chars ("test", "abcdef", "ABCDEF"); + +/* "clean the boat" => "CleAn the BoAt" */ +char *str = weechat_string_translate_chars ("clean the boat", "abc", "ABC"); +---- + +[NOTE] +Questa funzione non è disponibile nelle API per lo scripting. + ==== string_split // TRANSLATION MISSING |