summaryrefslogtreecommitdiff
path: root/doc/ja
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-02-26 20:02:07 +0100
committerSébastien Helleu <flashcode@flashtux.org>2019-02-27 07:46:22 +0100
commitc2859096cbf2030f977c9838af99bf13c8584625 (patch)
tree8d505344feee0e3e0f4af5ac8978a7527f541983 /doc/ja
parente473161c9fc3323a86d1cbf61705dcd24233de2a (diff)
downloadweechat-c2859096cbf2030f977c9838af99bf13c8584625.zip
api: add function string_match_list
Diffstat (limited to 'doc/ja')
-rw-r--r--doc/ja/weechat_plugin_api.ja.adoc64
-rw-r--r--doc/ja/weechat_scripting.ja.adoc1
2 files changed, 60 insertions, 5 deletions
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc
index e26b99325..3ead632f5 100644
--- a/doc/ja/weechat_plugin_api.ja.adoc
+++ b/doc/ja/weechat_plugin_api.ja.adoc
@@ -897,11 +897,65 @@ int match5 = weechat_string_match ("abcdef", "*b*d*", 0); /* == 1 */
match = weechat.string_match(string, mask, case_sensitive)
# 例
-match1 = weechat.string_match("abcdef", "abc*", 0) # 1
-match2 = weechat.string_match("abcdef", "*dd*", 0) # 0
-match3 = weechat.string_match("abcdef", "*def", 0) # 1
-match4 = weechat.string_match("abcdef", "*de*", 0) # 1
-match5 = weechat.string_match("abcdef", "*b*d*", 0) # 1
+match1 = weechat.string_match("abcdef", "abc*", 0) # == 1
+match2 = weechat.string_match("abcdef", "*dd*", 0) # == 0
+match3 = weechat.string_match("abcdef", "*def", 0) # == 1
+match4 = weechat.string_match("abcdef", "*de*", 0) # == 1
+match5 = weechat.string_match("abcdef", "*b*d*", 0) # == 1
+----
+
+==== string_match_list
+
+_WeeChat ≥ 2.5._
+
+// TRANSLATION MISSING
+Check if a string matches a list of masks where negative mask is allowed
+with the format "!word". A negative mask has higher priority than a standard
+mask.
+
+プロトタイプ:
+
+[source,C]
+----
+int weechat_string_match_list (const char *string, const char **masks,
+ int case_sensitive);
+----
+
+引数:
+
+// TRANSLATION MISSING
+* _string_: 文字列
+* _masks_: list of masks, with a NULL after the last mask in list; each mask
+ is compared to the string with the function <<_string_match,string_match>>
+* _case_sensitive_: 1 for case sensitive comparison, otherwise 0
+
+戻り値:
+
+// TRANSLATION MISSING
+* 1 if string matches list of masks (at least one mask matches and no negative
+ mask matches), otherwise 0
+
+C 言語での使用例:
+
+[source,C]
+----
+const char *masks[3] = { "*", "!abc*", NULL };
+int match1 = weechat_string_match_list ("abc", masks, 0); /* == 0 */
+int match2 = weechat_string_match_list ("abcdef", masks, 0); /* == 0 */
+int match3 = weechat_string_match_list ("def", masks, 0); /* == 1 */
+----
+
+スクリプト (Python) での使用例:
+
+[source,python]
+----
+# プロトタイプ
+match = weechat.string_match_list(string, masks, case_sensitive)
+
+# 例
+match1 = weechat.string_match("abc", "*,!abc*", 0) # == 0
+match2 = weechat.string_match("abcdef", "*,!abc*", 0) # == 0
+match3 = weechat.string_match("def", "*,!abc*", 0) # == 1
----
==== string_expand_home
diff --git a/doc/ja/weechat_scripting.ja.adoc b/doc/ja/weechat_scripting.ja.adoc
index d7529f101..f37cc2595 100644
--- a/doc/ja/weechat_scripting.ja.adoc
+++ b/doc/ja/weechat_scripting.ja.adoc
@@ -435,6 +435,7 @@ link:weechat_plugin_api.ja.html[WeeChat プラグイン API リファレンス]
ngettext +
strlen_screen +
string_match +
+ string_match_list +
string_has_highlight +
string_has_highlight_regex +
string_mask_to_regex +