summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-09-21 07:56:21 +0200
committerSébastien Helleu <flashcode@flashtux.org>2019-09-21 07:56:21 +0200
commitdcfc4e8ed59e015d0d83944bdadf39e8b83298ea (patch)
tree124e81991dc639ef7a208c22653f89e29adb4eb6 /doc
parent1919f23c2d67dcf38765a06943e66f89d5873a62 (diff)
downloadweechat-dcfc4e8ed59e015d0d83944bdadf39e8b83298ea.zip
core: add "length:xxx" and "lengthscr:xxx" in evaluation of expressions
Diffstat (limited to 'doc')
-rw-r--r--doc/de/autogen/user/weechat_commands.adoc20
-rw-r--r--doc/en/autogen/user/weechat_commands.adoc20
-rw-r--r--doc/en/weechat_plugin_api.en.adoc16
-rw-r--r--doc/fr/autogen/user/weechat_commands.adoc20
-rw-r--r--doc/fr/weechat_plugin_api.fr.adoc16
-rw-r--r--doc/it/autogen/user/weechat_commands.adoc20
-rw-r--r--doc/it/weechat_plugin_api.it.adoc17
-rw-r--r--doc/ja/autogen/user/weechat_commands.adoc20
-rw-r--r--doc/ja/weechat_plugin_api.ja.adoc18
-rw-r--r--doc/pl/autogen/user/weechat_commands.adoc20
10 files changed, 132 insertions, 55 deletions
diff --git a/doc/de/autogen/user/weechat_commands.adoc b/doc/de/autogen/user/weechat_commands.adoc
index a4f3ec153..d471d782b 100644
--- a/doc/de/autogen/user/weechat_commands.adoc
+++ b/doc/de/autogen/user/weechat_commands.adoc
@@ -303,15 +303,16 @@ Some variables are replaced in expression, using the format ${variable}, variabl
or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string")
5. a reversed string (format: "rev:xxx")
6. a repeated string (format: "repeat:count,string")
- 7. a color (format: "color:xxx", see "Plugin API reference", function "color")
- 8. an info (format: "info:name,arguments", arguments are optional)
- 9. current date/time (format: "date" or "date:format")
- 10. an environment variable (format: "env:XXX")
- 11. a ternary operator (format: "if:condition?value_if_true:value_if_false")
- 12. result of an expression with parentheses and operators + - * / // % (format: "calc:xxx")
- 13. an option (format: "file.section.option")
- 14. a local variable in buffer
- 15. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
+ 7. length of a string (format: "length:xxx" or "lengthscr:xxx")
+ 8. a color (format: "color:xxx", see "Plugin API reference", function "color")
+ 9. an info (format: "info:name,arguments", arguments are optional)
+ 10. current date/time (format: "date" or "date:format")
+ 11. an environment variable (format: "env:XXX")
+ 12. a ternary operator (format: "if:condition?value_if_true:value_if_false")
+ 13. result of an expression with parentheses and operators + - * / // % (format: "calc:xxx")
+ 14. an option (format: "file.section.option")
+ 15. a local variable in buffer
+ 16. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list, for example:
@@ -338,6 +339,7 @@ Examples (simple strings):
/eval -n ${if:${info:term_width}>80?big:small} ==> big
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
+ /eval -n ${length:test} ==> 4
/eval -n ${calc:(5+2)*3} ==> 21
Examples (conditions):
diff --git a/doc/en/autogen/user/weechat_commands.adoc b/doc/en/autogen/user/weechat_commands.adoc
index 2cf3cf4c1..4acf24692 100644
--- a/doc/en/autogen/user/weechat_commands.adoc
+++ b/doc/en/autogen/user/weechat_commands.adoc
@@ -303,15 +303,16 @@ Some variables are replaced in expression, using the format ${variable}, variabl
or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string")
5. a reversed string (format: "rev:xxx")
6. a repeated string (format: "repeat:count,string")
- 7. a color (format: "color:xxx", see "Plugin API reference", function "color")
- 8. an info (format: "info:name,arguments", arguments are optional)
- 9. current date/time (format: "date" or "date:format")
- 10. an environment variable (format: "env:XXX")
- 11. a ternary operator (format: "if:condition?value_if_true:value_if_false")
- 12. result of an expression with parentheses and operators + - * / // % (format: "calc:xxx")
- 13. an option (format: "file.section.option")
- 14. a local variable in buffer
- 15. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
+ 7. length of a string (format: "length:xxx" or "lengthscr:xxx")
+ 8. a color (format: "color:xxx", see "Plugin API reference", function "color")
+ 9. an info (format: "info:name,arguments", arguments are optional)
+ 10. current date/time (format: "date" or "date:format")
+ 11. an environment variable (format: "env:XXX")
+ 12. a ternary operator (format: "if:condition?value_if_true:value_if_false")
+ 13. result of an expression with parentheses and operators + - * / // % (format: "calc:xxx")
+ 14. an option (format: "file.section.option")
+ 15. a local variable in buffer
+ 16. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list, for example:
@@ -338,6 +339,7 @@ Examples (simple strings):
/eval -n ${if:${info:term_width}>80?big:small} ==> big
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
+ /eval -n ${length:test} ==> 4
/eval -n ${calc:(5+2)*3} ==> 21
Examples (conditions):
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index 3a16f07c8..91a7e14f3 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -2474,6 +2474,22 @@ expanded to last):
`+${repeat:5,-}+` |
`+-----+`
+| `+${length:xxx}+` +
+ (_WeeChat ≥ 2.7_) |
+ Length of string (number of UTF-8 chars). |
+ `+${length:test}+` +
+ `+${length:こんにちは世界}+` |
+ `+4+` +
+ `+7+`
+
+| `+${lengthscr:xxx}+` +
+ (_WeeChat ≥ 2.7_) |
+ Length of string displayed on screen. |
+ `+${lengthscr:test}+` +
+ `+${lengthscr:こんにちは世界}+` |
+ `+4+` +
+ `+14+`
+
| `+${re:N}+` +
(_WeeChat ≥ 1.1_) |
Regex captured group: `0` = whole string matching, `1` to `99` = group
diff --git a/doc/fr/autogen/user/weechat_commands.adoc b/doc/fr/autogen/user/weechat_commands.adoc
index 11b23825a..e2e966d85 100644
--- a/doc/fr/autogen/user/weechat_commands.adoc
+++ b/doc/fr/autogen/user/weechat_commands.adoc
@@ -303,15 +303,16 @@ Des variables sont remplacées dans l'expression, en utilisant le format ${varia
ou un maximum de caractères affichés à l'écran (format : "cutscr:max,suffixe,chaîne" ou "cutscr:+max,suffixe,chaîne")
5. une chaîne inversée (format : "rev:xxx")
6. une chaîne répétée (format : "repeat:nombre,chaîne")
- 7. une couleur (format : "color:xxx", voir la "Référence API extension", fonction "color")
- 8. une info (format : "info:nom,paramètres", les paramètres sont optionnels)
- 9. la date/heure courante (format : "date" ou "date:format")
- 10. une variable d'environnement (format : "env:XXX")
- 11. un opérateur ternaire (format : "if:condition?valeur_si_vrai:valeur_si_faux")
- 12. le résultat d'une expression avec parenthèses et les opérateurs + - * / // % (format: "calc:xxx")
- 13. une option (format : "fichier.section.option")
- 14. une variable locale du tampon
- 15. un hdata/variable (la valeur est automatiquement convertie en chaîne), par défaut "window" et "buffer" pointent vers la fenêtre et le tampon courants.
+ 7. longueur d'une chaîne (format : "length:xxx" ou "lengthscr:xxx")
+ 8. une couleur (format : "color:xxx", voir la "Référence API extension", fonction "color")
+ 9. une info (format : "info:nom,paramètres", les paramètres sont optionnels)
+ 10. la date/heure courante (format : "date" ou "date:format")
+ 11. une variable d'environnement (format : "env:XXX")
+ 12. un opérateur ternaire (format : "if:condition?valeur_si_vrai:valeur_si_faux")
+ 13. le résultat d'une expression avec parenthèses et les opérateurs + - * / // % (format: "calc:xxx")
+ 14. une option (format : "fichier.section.option")
+ 15. une variable locale du tampon
+ 16. un hdata/variable (la valeur est automatiquement convertie en chaîne), par défaut "window" et "buffer" pointent vers la fenêtre et le tampon courants.
Le format du hdata peut être le suivant :
hdata.var1.var2... : démarrer avec un hdata (le pointeur doit être connu), et demander les variables l'une après l'autre (d'autres hdata peuvent être suivis)
hdata[liste].var1.var2... : démarrer avec un hdata en utilisant une liste, par exemple :
@@ -338,6 +339,7 @@ Exemples (chaînes simples) :
/eval -n ${if:${info:term_width}>80?big:small} ==> big
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
+ /eval -n ${length:test} ==> 4
/eval -n ${calc:(5+2)*3} ==> 21
Exemples (conditions) :
diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc
index 9ee096314..1ea4042a4 100644
--- a/doc/fr/weechat_plugin_api.fr.adoc
+++ b/doc/fr/weechat_plugin_api.fr.adoc
@@ -2521,6 +2521,22 @@ première étendue à la dernière) :
`+${repeat:5,-}+` |
`+-----+`
+| `+${length:xxx}+` +
+ (_WeeChat ≥ 2.7_) |
+ Longueur de la chaîne (nombre de caractères UTF-8). |
+ `+${length:test}+` +
+ `+${length:こんにちは世界}+` |
+ `+4+` +
+ `+7+`
+
+| `+${lengthscr:xxx}+` +
+ (_WeeChat ≥ 2.7_) |
+ Longueur de la chaîne affichée à l'écran. |
+ `+${lengthscr:test}+` +
+ `+${lengthscr:こんにちは世界}+` |
+ `+4+` +
+ `+14+`
+
| `+${re:N}+` +
(_WeeChat ≥ 1.1_) |
Groupe regex capturé : `0` = toute la chaîne correspondante,
diff --git a/doc/it/autogen/user/weechat_commands.adoc b/doc/it/autogen/user/weechat_commands.adoc
index ee8b89271..e2b6961e8 100644
--- a/doc/it/autogen/user/weechat_commands.adoc
+++ b/doc/it/autogen/user/weechat_commands.adoc
@@ -303,15 +303,16 @@ Some variables are replaced in expression, using the format ${variable}, variabl
or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string")
5. a reversed string (format: "rev:xxx")
6. a repeated string (format: "repeat:count,string")
- 7. a color (format: "color:xxx", see "Plugin API reference", function "color")
- 8. an info (format: "info:name,arguments", arguments are optional)
- 9. current date/time (format: "date" or "date:format")
- 10. an environment variable (format: "env:XXX")
- 11. a ternary operator (format: "if:condition?value_if_true:value_if_false")
- 12. result of an expression with parentheses and operators + - * / // % (format: "calc:xxx")
- 13. an option (format: "file.section.option")
- 14. a local variable in buffer
- 15. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
+ 7. length of a string (format: "length:xxx" or "lengthscr:xxx")
+ 8. a color (format: "color:xxx", see "Plugin API reference", function "color")
+ 9. an info (format: "info:name,arguments", arguments are optional)
+ 10. current date/time (format: "date" or "date:format")
+ 11. an environment variable (format: "env:XXX")
+ 12. a ternary operator (format: "if:condition?value_if_true:value_if_false")
+ 13. result of an expression with parentheses and operators + - * / // % (format: "calc:xxx")
+ 14. an option (format: "file.section.option")
+ 15. a local variable in buffer
+ 16. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list, for example:
@@ -338,6 +339,7 @@ Examples (simple strings):
/eval -n ${if:${info:term_width}>80?big:small} ==> big
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
+ /eval -n ${length:test} ==> 4
/eval -n ${calc:(5+2)*3} ==> 21
Examples (conditions):
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 1b547fa40..72b139616 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -2582,6 +2582,22 @@ expanded to last):
`+${repeat:5,-}+` |
`+-----+`
+| `+${length:xxx}+` +
+ (_WeeChat ≥ 2.7_) |
+ Length of string (number of UTF-8 chars). |
+ `+${length:test}+` +
+ `+${length:こんにちは世界}+` |
+ `+4+` +
+ `+7+`
+
+| `+${lengthscr:xxx}+` +
+ (_WeeChat ≥ 2.7_) |
+ Length of string displayed on screen. |
+ `+${lengthscr:test}+` +
+ `+${lengthscr:こんにちは世界}+` |
+ `+4+` +
+ `+14+`
+
| `+${re:N}+` +
(_WeeChat ≥ 1.1_) |
Regex captured group: `0` = whole string matching, `1` to `99` = group
@@ -2642,7 +2658,6 @@ expanded to last):
`+${if:${info:term_width}>80?big:small}+` |
`+big+`
-// TRANSLATION MISSING
| `+${calc:xxx}+` +
(_WeeChat ≥ 2.7_) |
Result of expression, where parentheses and the following operators are
diff --git a/doc/ja/autogen/user/weechat_commands.adoc b/doc/ja/autogen/user/weechat_commands.adoc
index e1bce21d2..4ff1a42b4 100644
--- a/doc/ja/autogen/user/weechat_commands.adoc
+++ b/doc/ja/autogen/user/weechat_commands.adoc
@@ -303,15 +303,16 @@ Some variables are replaced in expression, using the format ${variable}, variabl
or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string")
5. a reversed string (format: "rev:xxx")
6. a repeated string (format: "repeat:count,string")
- 7. a color (format: "color:xxx", see "Plugin API reference", function "color")
- 8. an info (format: "info:name,arguments", arguments are optional)
- 9. current date/time (format: "date" or "date:format")
- 10. an environment variable (format: "env:XXX")
- 11. a ternary operator (format: "if:condition?value_if_true:value_if_false")
- 12. result of an expression with parentheses and operators + - * / // % (format: "calc:xxx")
- 13. an option (format: "file.section.option")
- 14. a local variable in buffer
- 15. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
+ 7. length of a string (format: "length:xxx" or "lengthscr:xxx")
+ 8. a color (format: "color:xxx", see "Plugin API reference", function "color")
+ 9. an info (format: "info:name,arguments", arguments are optional)
+ 10. current date/time (format: "date" or "date:format")
+ 11. an environment variable (format: "env:XXX")
+ 12. a ternary operator (format: "if:condition?value_if_true:value_if_false")
+ 13. result of an expression with parentheses and operators + - * / // % (format: "calc:xxx")
+ 14. an option (format: "file.section.option")
+ 15. a local variable in buffer
+ 16. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list, for example:
@@ -338,6 +339,7 @@ Examples (simple strings):
/eval -n ${if:${info:term_width}>80?big:small} ==> big
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
+ /eval -n ${length:test} ==> 4
/eval -n ${calc:(5+2)*3} ==> 21
Examples (conditions):
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc
index d26562c93..b65b7fc93 100644
--- a/doc/ja/weechat_plugin_api.ja.adoc
+++ b/doc/ja/weechat_plugin_api.ja.adoc
@@ -2485,6 +2485,24 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio
`+${repeat:5,-}+` |
`+-----+`
+// TRANSLATION MISSING
+| `+${length:xxx}+` +
+ (_WeeChat ≥ 2.7_) |
+ Length of string (number of UTF-8 chars). |
+ `+${length:test}+` +
+ `+${length:こんにちは世界}+` |
+ `+4+` +
+ `+7+`
+
+// TRANSLATION MISSING
+| `+${lengthscr:xxx}+` +
+ (_WeeChat ≥ 2.7_) |
+ Length of string displayed on screen. |
+ `+${lengthscr:test}+` +
+ `+${lengthscr:こんにちは世界}+` |
+ `+4+` +
+ `+14+`
+
| `+${re:N}+` +
(_WeeChat バージョン 1.1 以上で利用可_) |
正規表現のキャプチャグループ: `0` = マッチするすべての文字列、`1` から `99` =
diff --git a/doc/pl/autogen/user/weechat_commands.adoc b/doc/pl/autogen/user/weechat_commands.adoc
index d1dc22327..cd8c3aa64 100644
--- a/doc/pl/autogen/user/weechat_commands.adoc
+++ b/doc/pl/autogen/user/weechat_commands.adoc
@@ -303,15 +303,16 @@ Some variables are replaced in expression, using the format ${variable}, variabl
or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string")
5. a reversed string (format: "rev:xxx")
6. a repeated string (format: "repeat:count,string")
- 7. a color (format: "color:xxx", see "Plugin API reference", function "color")
- 8. an info (format: "info:name,arguments", arguments are optional)
- 9. current date/time (format: "date" or "date:format")
- 10. an environment variable (format: "env:XXX")
- 11. a ternary operator (format: "if:condition?value_if_true:value_if_false")
- 12. result of an expression with parentheses and operators + - * / // % (format: "calc:xxx")
- 13. an option (format: "file.section.option")
- 14. a local variable in buffer
- 15. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
+ 7. length of a string (format: "length:xxx" or "lengthscr:xxx")
+ 8. a color (format: "color:xxx", see "Plugin API reference", function "color")
+ 9. an info (format: "info:name,arguments", arguments are optional)
+ 10. current date/time (format: "date" or "date:format")
+ 11. an environment variable (format: "env:XXX")
+ 12. a ternary operator (format: "if:condition?value_if_true:value_if_false")
+ 13. result of an expression with parentheses and operators + - * / // % (format: "calc:xxx")
+ 14. an option (format: "file.section.option")
+ 15. a local variable in buffer
+ 16. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list, for example:
@@ -338,6 +339,7 @@ Examples (simple strings):
/eval -n ${if:${info:term_width}>80?big:small} ==> big
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
+ /eval -n ${length:test} ==> 4
/eval -n ${calc:(5+2)*3} ==> 21
Examples (conditions):