1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 13:26:38 +02:00

api: add function string_color_code_size (issue #1547)

This commit is contained in:
Sébastien Helleu
2020-08-22 08:55:16 +02:00
parent 7dd5abd625
commit 268aa631c6
27 changed files with 608 additions and 1 deletions
+17
View File
@@ -497,6 +497,23 @@ API_FUNC(string_format_size)
API_RETURN_STRING_FREE(result);
}
API_FUNC(string_color_code_size)
{
zend_string *z_string;
char *string;
int result;
API_INIT_FUNC(1, "string_color_code_size", API_RETURN_INT(0));
if (zend_parse_parameters (ZEND_NUM_ARGS(), "S", &z_string) == FAILURE)
API_WRONG_ARGS(API_RETURN_INT(0));
string = ZSTR_VAL(z_string);
result = weechat_string_color_code_size ((const char *)string);
API_RETURN_INT(result);
}
API_FUNC(string_remove_color)
{
zend_string *z_string, *z_replacement;