diff options
Diffstat (limited to 'src/plugins/perl')
-rw-r--r-- | src/plugins/perl/weechat-perl-api.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/perl/weechat-perl-api.c b/src/plugins/perl/weechat-perl-api.c index d9fc273af..62e1823a4 100644 --- a/src/plugins/perl/weechat-perl-api.c +++ b/src/plugins/perl/weechat-perl-api.c @@ -383,6 +383,20 @@ API_FUNC(string_format_size) API_RETURN_STRING_FREE(result); } +API_FUNC(string_color_code_size) +{ + int size; + dXSARGS; + + API_INIT_FUNC(1, "string_color_code_size", API_RETURN_INT(0)); + if (items < 1) + API_WRONG_ARGS(API_RETURN_INT(0)); + + size = weechat_string_color_code_size (SvPV_nolen (ST (0))); /* string */ + + API_RETURN_INT(size); +} + API_FUNC(string_remove_color) { char *result, *string, *replacement; @@ -5266,6 +5280,7 @@ weechat_perl_api_init (pTHX) API_DEF_FUNC(string_has_highlight_regex); API_DEF_FUNC(string_mask_to_regex); API_DEF_FUNC(string_format_size); + API_DEF_FUNC(string_color_code_size); API_DEF_FUNC(string_remove_color); API_DEF_FUNC(string_is_command_char); API_DEF_FUNC(string_input_for_buffer); |