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

api: add function string_format_size in scripting API

This commit is contained in:
Sébastien Helleu
2018-04-07 13:20:58 +02:00
parent ea365cccbf
commit 6de98179bc
22 changed files with 190 additions and 6 deletions
+15
View File
@@ -443,6 +443,21 @@ API_FUNC(string_mask_to_regex)
API_RETURN_STRING(retval);
}
API_FUNC(string_format_size)
{
zend_long z_size;
char *retval;
API_INIT_FUNC(1, "string_format_size", API_RETURN_EMPTY);
if (zend_parse_parameters (ZEND_NUM_ARGS(),
"l", &z_size) == FAILURE)
API_WRONG_ARGS(API_RETURN_EMPTY);
retval = weechat_string_format_size ((unsigned long long)z_size);
API_RETURN_STRING(retval);
}
API_FUNC(string_remove_color)
{
zend_string *z_string, *z_replacement;