1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

api: add function string_parse_size

This commit is contained in:
Sébastien Helleu
2022-09-25 10:53:37 +02:00
parent be6a29a596
commit 4d74a89cfc
32 changed files with 566 additions and 1 deletions
+14
View File
@@ -378,6 +378,19 @@ API_FUNC(string_format_size)
API_RETURN_STRING_FREE(result);
}
API_FUNC(string_parse_size)
{
unsigned long long value;
API_INIT_FUNC(1, "string_parse_size", "s", API_RETURN_LONG(0));
v8::String::Utf8Value size(args[0]);
value = weechat_string_parse_size (*size);
API_RETURN_LONG(value);
}
API_FUNC(string_color_code_size)
{
int size;
@@ -5060,6 +5073,7 @@ WeechatJsV8::loadLibs()
API_DEF_FUNC(string_has_highlight_regex);
API_DEF_FUNC(string_mask_to_regex);
API_DEF_FUNC(string_format_size);
API_DEF_FUNC(string_parse_size);
API_DEF_FUNC(string_color_code_size);
API_DEF_FUNC(string_remove_color);
API_DEF_FUNC(string_is_command_char);