summaryrefslogtreecommitdiff
path: root/src/plugins/perl/weechat-perl-api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/perl/weechat-perl-api.c')
-rw-r--r--src/plugins/perl/weechat-perl-api.c15
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 33fd6677c..d25c8f600 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_parse_size)
+{
+ unsigned long long value;
+ dXSARGS;
+
+ API_INIT_FUNC(1, "string_parse_size", API_RETURN_LONG(0));
+ if (items < 1)
+ API_WRONG_ARGS(API_RETURN_LONG(0));
+
+ value = weechat_string_parse_size (SvPV_nolen (ST (0))); /* size */
+
+ API_RETURN_LONG(value);
+}
+
API_FUNC(string_color_code_size)
{
int size;
@@ -5367,6 +5381,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_parse_size);
API_DEF_FUNC(string_color_code_size);
API_DEF_FUNC(string_remove_color);
API_DEF_FUNC(string_is_command_char);