summaryrefslogtreecommitdiff
path: root/doc/it/weechat_plugin_api.it.adoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-03-10 09:21:28 +0100
committerSébastien Helleu <flashcode@flashtux.org>2024-03-10 09:21:28 +0100
commit3f49b1b44a5990e580a65b5c9b9d08d5a54bd81e (patch)
tree50ae73a5133223aafe4319afe34ac32ebc66c32d /doc/it/weechat_plugin_api.it.adoc
parent431cf23a0cbf869970db4580470a14a36ef7ede4 (diff)
downloadweechat-3f49b1b44a5990e580a65b5c9b9d08d5a54bd81e.zip
core: use whole replacement string instead of first char in function gui_color_decode
Diffstat (limited to 'doc/it/weechat_plugin_api.it.adoc')
-rw-r--r--doc/it/weechat_plugin_api.it.adoc18
1 files changed, 10 insertions, 8 deletions
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 9c5f837b1..a0058a13e 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -2443,23 +2443,25 @@ size = weechat.string_color_code_size(weechat.color("yellow,red")) # size == 7
==== string_remove_color
+// TRANSLATION MISSING
+_Updated in 4.3.0._
+
Rimuove i colori di WeeChat da una stringa.
Prototipo:
[source,c]
----
-char *weechat_string_remove_color (const char *string,
- const char *replacement);
+char *weechat_string_remove_color (const char *string, const char *replacement);
----
Argomenti:
* _string_: stringa
-* _replacement_: se non NULL e non vuota, i codici colore di WeeChat sono
- sostituiti dal primo carattere di questa stringa, altrimenti i codici colori di
- WeeChat ed i caratteri seguenti (se correlate al colore) sono rimossi dalla
- stringa
+// TRANSLATION MISSING
+* _replacement_: if not NULL and not empty, WeeChat color codes are replaced by
+ this string, otherwise WeeChat color codes and following chars (if related
+ to color) are removed from string
Valore restituito:
@@ -2475,7 +2477,7 @@ char *str = weechat_string_remove_color (my_string1, NULL);
free (str);
/* sostituisce i codici colore con "?" */
-char *str = weechat_string_remove_color (my_string2, "?");
+char *str = weechat_string_remove_color (my_string2, "[color]");
/* ... */
free (str);
----
@@ -2488,7 +2490,7 @@ Script (Python):
def string_remove_color(string: str, replacement: str) -> str: ...
# esempio
-str = weechat.string_remove_color(my_string, "?")
+str = weechat.string_remove_color(my_string, "[color]")
----
==== string_base_encode