diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2018-04-07 13:20:58 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2018-04-07 13:20:58 +0200 |
commit | 6de98179bc87df4f2da38e36d64a03a1c0f9f623 (patch) | |
tree | ac3505c42a0297cf32fa966fc67f86a7825d8520 /doc/en | |
parent | ea365cccbffb245285b33e5beeebac06743f7056 (diff) | |
download | weechat-6de98179bc87df4f2da38e36d64a03a1c0f9f623.zip |
api: add function string_format_size in scripting API
Diffstat (limited to 'doc/en')
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 12 | ||||
-rw-r--r-- | doc/en/weechat_scripting.en.adoc | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 1c290140d..ebf33d451 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -1718,8 +1718,16 @@ char *str = weechat_string_format_size (2097152); /* str == "2.10 MB" */ free (str); ---- -[NOTE] -This function is not available in scripting API. +Script (Python): + +[source,python] +---- +# prototype +str = weechat.string_format_size(size) + +# example +str = weechat.string_format_size(15200) # == "15.2 KB" +---- ==== string_remove_color diff --git a/doc/en/weechat_scripting.en.adoc b/doc/en/weechat_scripting.en.adoc index be39a2e49..6d2e829bc 100644 --- a/doc/en/weechat_scripting.en.adoc +++ b/doc/en/weechat_scripting.en.adoc @@ -430,6 +430,7 @@ List of functions in script API: string_has_highlight + string_has_highlight_regex + string_mask_to_regex + + string_format_size + string_remove_color + string_is_command_char + string_input_for_buffer + |