summaryrefslogtreecommitdiff
path: root/doc/en/weechat_plugin_api.en.adoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-03-27 21:14:51 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-03-27 21:14:51 +0200
commitf99c866f352c9bc7f3ba0e7d228a5942dd616de0 (patch)
tree3180f347e130d6b41e9863902fe8404d5a28e4a4 /doc/en/weechat_plugin_api.en.adoc
parentf37ecbfefd63d1966a877b3999ab472147282e77 (diff)
downloadweechat-f99c866f352c9bc7f3ba0e7d228a5942dd616de0.zip
core: add cut of string with max chars displayed in evaluation of expressions
The syntax is: ${cutscr:max,suffix,string}. The string is cut after max chars displayed on screen. If the string is cut, the optional suffix is added after.
Diffstat (limited to 'doc/en/weechat_plugin_api.en.adoc')
-rw-r--r--doc/en/weechat_plugin_api.en.adoc14
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index 2d0ea9e33..08978f590 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -2042,11 +2042,19 @@ expanded to last):
| `+${cut:max,suffix,string}+` +
(_WeeChat ≥ 1.8_) |
- String with `max` chars displayed, and optional `suffix` if string is cut. |
+ String with `max` chars, and optional `suffix` if string is cut. |
`+${cut:4,…,this is a test}+` +
- `+${cut:2,>>,àéçôî}+` |
+ `+${cut:2,>>,こんにちは世界}+` |
`+this…+` +
- `+àé>>+`
+ `+こん>>+`
+
+| `+${cutscr:max,suffix,string}+` +
+ (_WeeChat ≥ 1.8_) |
+ String with `max` chars displayed on screen, and optional `suffix` if string is cut. |
+ `+${cutscr:4,…,this is a test}+` +
+ `+${cutscr:2,>>,こんにちは世界}+` |
+ `+this…+` +
+ `+こ>>+`
| `+${re:N}+` |
Regex captured group: `0` = whole string matching, `1` to `99` = group