From c2859096cbf2030f977c9838af99bf13c8584625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 26 Feb 2019 20:02:07 +0100 Subject: api: add function string_match_list --- src/plugins/javascript/weechat-js-api.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/plugins/javascript') diff --git a/src/plugins/javascript/weechat-js-api.cpp b/src/plugins/javascript/weechat-js-api.cpp index a40f61d57..8f0032bac 100644 --- a/src/plugins/javascript/weechat-js-api.cpp +++ b/src/plugins/javascript/weechat-js-api.cpp @@ -305,6 +305,24 @@ API_FUNC(string_match) API_RETURN_INT(value); } +API_FUNC(string_match_list) +{ + int value; + + API_INIT_FUNC(1, "string_match_list", "ssi", API_RETURN_INT(0)); + + v8::String::Utf8Value string(args[0]); + v8::String::Utf8Value masks(args[1]); + int case_sensitive = args[2]->IntegerValue(); + + value = plugin_script_api_string_match_list (weechat_js_plugin, + *string, + *masks, + case_sensitive); + + API_RETURN_INT(value); +} + API_FUNC(string_has_highlight) { int value; @@ -4806,6 +4824,7 @@ WeechatJsV8::loadLibs() API_DEF_FUNC(ngettext); API_DEF_FUNC(strlen_screen); API_DEF_FUNC(string_match); + API_DEF_FUNC(string_match_list); API_DEF_FUNC(string_has_highlight); API_DEF_FUNC(string_has_highlight_regex); API_DEF_FUNC(string_mask_to_regex); -- cgit v1.2.3