summaryrefslogtreecommitdiff
path: root/doc/en/weechat_plugin_api.en.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/en/weechat_plugin_api.en.adoc')
-rw-r--r--doc/en/weechat_plugin_api.en.adoc110
1 files changed, 110 insertions, 0 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index 2d3091af6..7495b6107 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -2008,6 +2008,116 @@ Return value:
* evaluated expression (must be freed by calling "free" after use), or NULL
if problem (invalid expression or not enough memory)
+List of logical operators that can be used in conditions (by order of priority,
+from first used to last):
+
+[width="100%",cols="2,8,4,4",options="header"]
+|===
+| Operator | Description | Examples | Results
+
+| `+&&+` |
+ Logical "and" |
+ `+25 && 77+` +
+ `+25 && 0+` |
+ `+1+` +
+ `+0+`
+
+| `+\|\|+` |
+ Logical "or" |
+ `+25 \|\| 0+` +
+ `+0 \|\| 0+` |
+ `+1+` +
+ `+0+`
+|===
+
+List of comparison operators that can be used in conditions (by order of priority,
+from first used to last):
+
+[width="100%",cols="2,8,4,4",options="header"]
+|===
+| Operator | Description | Examples | Results
+
+| `+=~+` |
+ Is matching POSIX extended regex (optional flags are allowed, see function <<_string_regcomp,string_regcomp>>) |
+ `+abc def =~ ab.*ef+` +
+ `+abc def =~ y.*z+` |
+ `+1+` +
+ `+0+`
+
+| `+!~+` |
+ Is NOT matching POSIX extended regex (optional flags are allowed, see function <<_string_regcomp,string_regcomp>>) |
+ `+abc def !~ ab.*ef+` +
+ `+abc def !~ y.*z+` |
+ `+0+` +
+ `+1+`
+
+| `+=*+` +
+ (_WeeChat ≥ 1.8_) |
+ Is matching mask where "*" is allowed (see function <<_string_match,string_match>>) |
+ `+abc def =* a*f+` +
+ `+abc def =* y*z+` |
+ `+1+` +
+ `+0+`
+
+| `+!*+` +
+ (_WeeChat ≥ 1.8_) |
+ Is NOT wildcard mask where "*" is allowed (see function <<_string_match,string_match>>) |
+ `+abc def !* a*f+` +
+ `+abc def !* y*z+` |
+ `+0+` +
+ `+1+`
+
+| `+==+` |
+ Equal |
+ `+test == test+` +
+ `+test == string+` |
+ `+1+` +
+ `+0+`
+
+| `+!=+` |
+ Not equal |
+ `+test != test+` +
+ `+test != string+` |
+ `+0+` +
+ `+1+`
+
+| `+<=+` |
+ Less or equal |
+ `+abc \<= defghi+` +
+ `+abc \<= abc+` +
+ `+defghi \<= abc+` |
+ `+1+` +
+ `+1+` +
+ `+0+`
+
+| `+<+` |
+ Less |
+ `+abc < defghi+` +
+ `+abc < abc+` +
+ `+defghi < abc+` |
+ `+1+` +
+ `+0+` +
+ `+0+`
+
+| `+>=+` |
+ Greater or equal |
+ `+defghi >= abc+` +
+ `+abc >= abc+` +
+ `+abc >= defghi+` |
+ `+1+` +
+ `+1+` +
+ `+0+`
+
+| `+>+` |
+ Greater |
+ `+defghi > abc+` +
+ `+abc > abc+` +
+ `+abc > defghi+` |
+ `+1+` +
+ `+0+` +
+ `+0+`
+|===
+
List of variables expanded in expression (by order of priority, from first
expanded to last):