diff options
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 + |