mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 02:03:13 +02:00
api: add function string_format_size in scripting API
This commit is contained in:
@@ -393,6 +393,21 @@ weechat_guile_api_string_mask_to_regex (SCM mask)
|
||||
API_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
SCM
|
||||
weechat_guile_api_string_format_size (SCM size)
|
||||
{
|
||||
char *result;
|
||||
SCM return_value;
|
||||
|
||||
API_INIT_FUNC(1, "string_format_size", API_RETURN_EMPTY);
|
||||
if (!scm_is_integer (size))
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
result = weechat_string_format_size (scm_to_ulong_long (size));
|
||||
|
||||
API_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
SCM
|
||||
weechat_guile_api_string_remove_color (SCM string, SCM replacement)
|
||||
{
|
||||
@@ -4863,6 +4878,7 @@ weechat_guile_api_module_init (void *data)
|
||||
API_DEF_FUNC(string_has_highlight, 2);
|
||||
API_DEF_FUNC(string_has_highlight_regex, 2);
|
||||
API_DEF_FUNC(string_mask_to_regex, 1);
|
||||
API_DEF_FUNC(string_format_size, 1);
|
||||
API_DEF_FUNC(string_remove_color, 2);
|
||||
API_DEF_FUNC(string_is_command_char, 1);
|
||||
API_DEF_FUNC(string_input_for_buffer, 1);
|
||||
|
||||
Reference in New Issue
Block a user