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 | |
parent | 03899e5ea5ed408d334c203ff535d02d1a8b5b4a (diff) | |
download | weechat-bc2fb071e22589aa219ce551b0112bacbd3cca8f.zip |
api: add function string_translate_chars
Diffstat (limited to 'doc')
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 39 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 39 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 42 | ||||
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.adoc | 41 | ||||
-rw-r--r-- | doc/sr/weechat_plugin_api.sr.adoc | 42 |
5 files changed, 203 insertions, 0 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index c72bebe2f..317dbfaf1 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -1587,6 +1587,45 @@ if (weechat_string_regcomp (&my_regex, "([0-9]{4})-([0-9]{2})-([0-9]{2})", [NOTE] This function is not available in scripting API. +==== string_translate_chars + +_WeeChat ≥ 3.8._ + +Translate chars in a string. + +Prototype: + +[source,c] +---- +char *string_translate_chars (const char *string, const char *chars1, const char *chars2); +---- + +Arguments: + +* _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_ + +Return value: + +* string with translated chars, NULL if problem (must be freed by calling "free" + after use) + +C examples: + +[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] +This function is not available in scripting API. + ==== string_split _Updated in 2.5, 2.6._ diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index 7f738eca8..fcb24bb6d 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -1615,6 +1615,45 @@ if (weechat_string_regcomp (&my_regex, "([0-9]{4})-([0-9]{2})-([0-9]{2})", [NOTE] Cette fonction n'est pas disponible dans l'API script. +==== string_translate_chars + +_WeeChat ≥ 3.8._ + +Traduire des caractères dans une chaîne. + +Prototype : + +[source,c] +---- +char *string_translate_chars (const char *string, const char *chars1, const char *chars2); +---- + +Paramètres : + +* _string_ : chaîne +* _chars1_ : chaîne avec des caractères à traduire +* _chars2_ : chaîne avec les caractères de remplacement ; elle doit contenir + le même nombre de caractères UTF-8 que _chars1_ + +Valeur de retour : + +* chaîne avec les caractères traduits, NULL en cas de problème (doit être + supprimée par un appel à "free" après utilisation) + +Exemples en 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] +Cette fonction n'est pas disponible dans l'API script. + ==== string_split _Mis à jour dans la 2.5, 2.6._ 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 diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 2eec03bc0..67ac48c06 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -1605,6 +1605,47 @@ if (weechat_string_regcomp (&my_regex, "([0-9]{4})-([0-9]{2})-([0-9]{2})", [NOTE] スクリプト API ではこの関数を利用できません。 +==== string_translate_chars + +_WeeChat バージョン 3.8 以上で利用可。_ + +// TRANSLATION MISSING +Translate chars in a string. + +プロトタイプ: + +[source,c] +---- +char *string_translate_chars (const char *string, const char *chars1, const char *chars2); +---- + +引数: + +// 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_ + +戻り値: + +* string with translated chars, NULL if problem (must be freed by calling "free" + after use) + +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] +スクリプト API ではこの関数を利用できません。 + ==== string_split _WeeChat バージョン 2.5、2.6 で更新。_ diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc index b46cc19db..183877476 100644 --- a/doc/sr/weechat_plugin_api.sr.adoc +++ b/doc/sr/weechat_plugin_api.sr.adoc @@ -1520,6 +1520,48 @@ if (weechat_string_regcomp (&my_regex, "([0-9]{4})-([0-9]{2})-([0-9]{2})", [NOTE] Ова функција није доступна у API скриптовања. +==== string_translate_chars + +_WeeChat ≥ 3.8._ + +// TRANSLATION MISSING +Translate chars in a string. + +Прототип: + +[source,c] +---- +char *string_translate_chars (const char *string, const char *chars1, const char *chars2); +---- + +Аргументи: + +// 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_ + +Повратна вредност: + +// TRANSLATION MISSING +* string with translated chars, NULL if problem (must be freed by calling "free" + after use) + +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] +Ова функција није доступна у API скриптовања. + ==== string_split _Ажурирано у верзијама 2.5, 2.6._ |