diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/de/weechat_scripting.de.adoc | 1 | ||||
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 49 | ||||
-rw-r--r-- | doc/en/weechat_scripting.en.adoc | 1 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 47 | ||||
-rw-r--r-- | doc/fr/weechat_scripting.fr.adoc | 1 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 51 | ||||
-rw-r--r-- | doc/it/weechat_scripting.it.adoc | 1 | ||||
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.adoc | 51 | ||||
-rw-r--r-- | doc/ja/weechat_scripting.ja.adoc | 1 | ||||
-rw-r--r-- | doc/pl/weechat_scripting.pl.adoc | 1 |
10 files changed, 204 insertions, 0 deletions
diff --git a/doc/de/weechat_scripting.de.adoc b/doc/de/weechat_scripting.de.adoc index 82ae34c19..3f1921a21 100644 --- a/doc/de/weechat_scripting.de.adoc +++ b/doc/de/weechat_scripting.de.adoc @@ -562,6 +562,7 @@ Liste der Skript API Funktionen: string_has_highlight_regex + string_mask_to_regex + string_format_size + + string_color_code_size + string_remove_color + string_is_command_char + string_input_for_buffer + diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index c7fb69c34..172e9a936 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -1888,6 +1888,55 @@ str = weechat.string_format_size(size) str = weechat.string_format_size(15200) # == "15.2 KB" ---- +==== string_color_code_size + +_WeeChat ≥ 3.0._ + +Return the size (in bytes) of the WeeChat color code at the beginning of +the string. + +Prototype: + +[source,C] +---- +int weechat_string_color_code_size (const char *string); +---- + +Arguments: + +* _string_: string + +Return value: + +* size (in bytes) of the WeeChat color code at the beginning of the string; + if the string is NULL, empty or does not start with a color code, 0 is returned; + if the string begins with multiple color codes, only the size of the first one + is returned + +C examples: + +[source,C] +---- +int size; + +size = weechat_string_color_code_size ("test"); /* size == 0 */ +size = weechat_string_color_code_size (weechat_color ("bold")); /* size == 2 */ +size = weechat_string_color_code_size (weechat_color ("yellow,red")); /* size == 7 */ +---- + +Script (Python): + +[source,python] +---- +# prototype +size = weechat.string_color_code_size(string) + +# examples +size = weechat.string_color_code_size("test") # size == 0 +size = weechat.string_color_code_size(weechat.color("bold")) # size == 2 +size = weechat.string_color_code_size(weechat.color("yellow,red")) # size == 7 +---- + ==== string_remove_color Remove WeeChat colors from a string. diff --git a/doc/en/weechat_scripting.en.adoc b/doc/en/weechat_scripting.en.adoc index 1c57349f2..a14fc1342 100644 --- a/doc/en/weechat_scripting.en.adoc +++ b/doc/en/weechat_scripting.en.adoc @@ -546,6 +546,7 @@ List of functions in script API: string_has_highlight_regex + string_mask_to_regex + string_format_size + + string_color_code_size + string_remove_color + string_is_command_char + string_input_for_buffer + diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index c89527c4d..df275701e 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -1922,6 +1922,53 @@ str = weechat.string_format_size(size) str = weechat.string_format_size(15200) # == "15.2 Ko" ---- +==== string_color_code_size + +_WeeChat ≥ 3.0._ + +Retourner la taille (en octets) du code couleur WeeChat au début de la chaîne. + +Prototype : + +[source,C] +---- +int weechat_string_color_code_size (const char *string); +---- + +Paramètres : + +* _string_ : chaîne + +Valeur de retour : + +* taille (en octets) du code couleur WeeChat au début de la chaîne ; + si la chaîne est NULL, vide ou ne commence pas avec un code couleur, 0 est retourné ; + si la chaîne commence par plusieurs codes couleur, seule la taille du premier est retournée + +Exemples en C : + +[source,C] +---- +int size; + +size = weechat_string_color_code_size ("test"); /* size == 0 */ +size = weechat_string_color_code_size (weechat_color ("bold")); /* size == 2 */ +size = weechat_string_color_code_size (weechat_color ("yellow,red")); /* size == 7 */ +---- + +Script (Python) : + +[source,python] +---- +# prototype +size = weechat.string_color_code_size(string) + +# exemples +size = weechat.string_color_code_size("test") # size == 0 +size = weechat.string_color_code_size(weechat.color("bold")) # size == 2 +size = weechat.string_color_code_size(weechat.color("yellow,red")) # size == 7 +---- + ==== string_remove_color Supprimer les couleurs WeeChat dans une chaîne. diff --git a/doc/fr/weechat_scripting.fr.adoc b/doc/fr/weechat_scripting.fr.adoc index b42e29d14..bb60b9acb 100644 --- a/doc/fr/weechat_scripting.fr.adoc +++ b/doc/fr/weechat_scripting.fr.adoc @@ -565,6 +565,7 @@ Liste des fonctions de l'API script : string_has_highlight_regex + string_mask_to_regex + string_format_size + + string_color_code_size + string_remove_color + string_is_command_char + string_input_for_buffer + diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 2896e2ce4..62b85ec7c 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -1967,6 +1967,57 @@ str = weechat.string_format_size(size) str = weechat.string_format_size(15200) # == "15.2 KB" ---- +==== string_color_code_size + +_WeeChat ≥ 3.0._ + +// TRANSLATION MISSING +Return the size (in bytes) of the WeeChat color code at the beginning of +the string. + +Prototipo: + +[source,C] +---- +int weechat_string_color_code_size (const char *string); +---- + +Argomenti: + +* _string_: stringa + +Valore restituito: + +// TRANSLATION MISSING +* size (in bytes) of the WeeChat color code at the beginning of the string; + if the string is NULL, empty or does not start with a color code, 0 is returned; + if the string begins with multiple color codes, only the size of the first one + is returned + +Esempi: + +[source,C] +---- +int size; + +size = weechat_string_color_code_size ("test"); /* size == 0 */ +size = weechat_string_color_code_size (weechat_color ("bold")); /* size == 2 */ +size = weechat_string_color_code_size (weechat_color ("yellow,red")); /* size == 7 */ +---- + +Script (Python): + +[source,python] +---- +# prototipo +size = weechat.string_color_code_size(string) + +# esempio +size = weechat.string_color_code_size("test") # size == 0 +size = weechat.string_color_code_size(weechat.color("bold")) # size == 2 +size = weechat.string_color_code_size(weechat.color("yellow,red")) # size == 7 +---- + ==== string_remove_color Rimuove i colori di WeeChat da una stringa. diff --git a/doc/it/weechat_scripting.it.adoc b/doc/it/weechat_scripting.it.adoc index 21d8f5795..c00846811 100644 --- a/doc/it/weechat_scripting.it.adoc +++ b/doc/it/weechat_scripting.it.adoc @@ -575,6 +575,7 @@ Elenco di funzioni nelle API per gli script: string_has_highlight_regex + string_mask_to_regex + string_format_size + + string_color_code_size + string_remove_color + string_is_command_char + string_input_for_buffer + diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index c9b1ee1f0..fdd40dea5 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -1900,6 +1900,57 @@ str = weechat.string_format_size(size) str = weechat.string_format_size(15200) # == "15.2 KB" ---- +==== string_color_code_size + +_WeeChat ≥ 3.0._ + +// TRANSLATION MISSING +Return the size (in bytes) of the WeeChat color code at the beginning of +the string. + +プロトタイプ: + +[source,C] +---- +int weechat_string_color_code_size (const char *string); +---- + +引数: + +* _string_: 文字列 + +戻り値: + +// TRANSLATION MISSING +* size (in bytes) of the WeeChat color code at the beginning of the string; + if the string is NULL, empty or does not start with a color code, 0 is returned; + if the string begins with multiple color codes, only the size of the first one + is returned + +C 言語での使用例: + +[source,C] +---- +int size; + +size = weechat_string_color_code_size ("test"); /* size == 0 */ +size = weechat_string_color_code_size (weechat_color ("bold")); /* size == 2 */ +size = weechat_string_color_code_size (weechat_color ("yellow,red")); /* size == 7 */ +---- + +スクリプト (Python) での使用例: + +[source,python] +---- +# プロトタイプ +size = weechat.string_color_code_size(string) + +# 例 +size = weechat.string_color_code_size("test") # size == 0 +size = weechat.string_color_code_size(weechat.color("bold")) # size == 2 +size = weechat.string_color_code_size(weechat.color("yellow,red")) # size == 7 +---- + ==== string_remove_color 文字列から WeeChat 色コードを削除。 diff --git a/doc/ja/weechat_scripting.ja.adoc b/doc/ja/weechat_scripting.ja.adoc index 2527d2068..feca5729f 100644 --- a/doc/ja/weechat_scripting.ja.adoc +++ b/doc/ja/weechat_scripting.ja.adoc @@ -567,6 +567,7 @@ link:weechat_plugin_api.ja.html[WeeChat プラグイン API リファレンス] string_has_highlight_regex + string_mask_to_regex + string_format_size + + string_color_code_size + string_remove_color + string_is_command_char + string_input_for_buffer + diff --git a/doc/pl/weechat_scripting.pl.adoc b/doc/pl/weechat_scripting.pl.adoc index abc2f2eb4..29279354c 100644 --- a/doc/pl/weechat_scripting.pl.adoc +++ b/doc/pl/weechat_scripting.pl.adoc @@ -553,6 +553,7 @@ Lista funkcji w API skryptów: string_has_highlight_regex + string_mask_to_regex + string_format_size + + string_color_code_size + string_remove_color + string_is_command_char + string_input_for_buffer + |