doc: add list of logical and comparison operators in function string_eval_expression (plugin API reference)
This commit is contained in:
parent
1fc06ba0ac
commit
b3073054a4
@ -2008,6 +2008,116 @@ Return value:
|
|||||||
* evaluated expression (must be freed by calling "free" after use), or NULL
|
* evaluated expression (must be freed by calling "free" after use), or NULL
|
||||||
if problem (invalid expression or not enough memory)
|
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
|
List of variables expanded in expression (by order of priority, from first
|
||||||
expanded to last):
|
expanded to last):
|
||||||
|
|
||||||
|
@ -2050,6 +2050,116 @@ Valeur de retour :
|
|||||||
utilisation), ou NULL si problème (expression invalide ou pas assez de
|
utilisation), ou NULL si problème (expression invalide ou pas assez de
|
||||||
mémoire)
|
mémoire)
|
||||||
|
|
||||||
|
Liste des opérateurs logiques qui peuvent être utilisés dans les conditions
|
||||||
|
(par ordre de priorité, du premier utilisé au dernier) :
|
||||||
|
|
||||||
|
[width="100%",cols="2,8,4,4",options="header"]
|
||||||
|
|===
|
||||||
|
| Opérateur | Description | Exemples | Résultats
|
||||||
|
|
||||||
|
| `+&&+` |
|
||||||
|
"Et" logique |
|
||||||
|
`+25 && 77+` +
|
||||||
|
`+25 && 0+` |
|
||||||
|
`+1+` +
|
||||||
|
`+0+`
|
||||||
|
|
||||||
|
| `+\|\|+` |
|
||||||
|
"Ou" logique |
|
||||||
|
`+25 \|\| 0+` +
|
||||||
|
`+0 \|\| 0+` |
|
||||||
|
`+1+` +
|
||||||
|
`+0+`
|
||||||
|
|===
|
||||||
|
|
||||||
|
Liste des opérateurs de comparaison qui peuvent être utilisés dans les conditions
|
||||||
|
(par ordre de priorité, du premier utilisé au dernier) :
|
||||||
|
|
||||||
|
[width="100%",cols="2,8,4,4",options="header"]
|
||||||
|
|===
|
||||||
|
| Opérateur | Description | Exemples | Résultats
|
||||||
|
|
||||||
|
| `+=~+` |
|
||||||
|
Correspond à l'expression régulière POSIX étendue (des "flags" facultatifs sont autorisés, voir la fonction <<_string_regcomp,string_regcomp>>) |
|
||||||
|
`+abc def =~ ab.*ef+` +
|
||||||
|
`+abc def =~ y.*z+` |
|
||||||
|
`+1+` +
|
||||||
|
`+0+`
|
||||||
|
|
||||||
|
| `+!~+` |
|
||||||
|
Ne correspond PAS à l'expression régulière POSIX étendue (des "flags" facultatifs sont autorisés, voir la fonction <<_string_regcomp,string_regcomp>>) |
|
||||||
|
`+abc def !~ ab.*ef+` +
|
||||||
|
`+abc def !~ y.*z+` |
|
||||||
|
`+0+` +
|
||||||
|
`+1+`
|
||||||
|
|
||||||
|
| `+=*+` +
|
||||||
|
(_WeeChat ≥ 1.8_) |
|
||||||
|
Correspond au masque où le caractère joker "*" est autorisé (voir la fonction <<_string_match,string_match>>) |
|
||||||
|
`+abc def =* a*f+` +
|
||||||
|
`+abc def =* y*z+` |
|
||||||
|
`+1+` +
|
||||||
|
`+0+`
|
||||||
|
|
||||||
|
| `+!*+` +
|
||||||
|
(_WeeChat ≥ 1.8_) |
|
||||||
|
Ne correspond PAS au masque où le caractère joker "*" est autorisé (voir la fonction <<_string_match,string_match>>) |
|
||||||
|
`+abc def !* a*f+` +
|
||||||
|
`+abc def !* y*z+` |
|
||||||
|
`+0+` +
|
||||||
|
`+1+`
|
||||||
|
|
||||||
|
| `+==+` |
|
||||||
|
Égal |
|
||||||
|
`+test == test+` +
|
||||||
|
`+test == string+` |
|
||||||
|
`+1+` +
|
||||||
|
`+0+`
|
||||||
|
|
||||||
|
| `+!=+` |
|
||||||
|
Non égal |
|
||||||
|
`+test != test+` +
|
||||||
|
`+test != string+` |
|
||||||
|
`+0+` +
|
||||||
|
`+1+`
|
||||||
|
|
||||||
|
| `+<=+` |
|
||||||
|
Plus petit ou égal |
|
||||||
|
`+abc \<= defghi+` +
|
||||||
|
`+abc \<= abc+` +
|
||||||
|
`+defghi \<= abc+` |
|
||||||
|
`+1+` +
|
||||||
|
`+1+` +
|
||||||
|
`+0+`
|
||||||
|
|
||||||
|
| `+<+` |
|
||||||
|
Plus petit |
|
||||||
|
`+abc < defghi+` +
|
||||||
|
`+abc < abc+` +
|
||||||
|
`+defghi < abc+` |
|
||||||
|
`+1+` +
|
||||||
|
`+0+` +
|
||||||
|
`+0+`
|
||||||
|
|
||||||
|
| `+>=+` |
|
||||||
|
Plus grand ou égal |
|
||||||
|
`+defghi >= abc+` +
|
||||||
|
`+abc >= abc+` +
|
||||||
|
`+abc >= defghi+` |
|
||||||
|
`+1+` +
|
||||||
|
`+1+` +
|
||||||
|
`+0+`
|
||||||
|
|
||||||
|
| `+>+` |
|
||||||
|
Plus grand |
|
||||||
|
`+defghi > abc+` +
|
||||||
|
`+abc > abc+` +
|
||||||
|
`+abc > defghi+` |
|
||||||
|
`+1+` +
|
||||||
|
`+0+` +
|
||||||
|
`+0+`
|
||||||
|
|===
|
||||||
|
|
||||||
Liste des variables étendues dans l'expression (par ordre de priorité, de la
|
Liste des variables étendues dans l'expression (par ordre de priorité, de la
|
||||||
première étendue à la dernière) :
|
première étendue à la dernière) :
|
||||||
|
|
||||||
|
@ -2084,6 +2084,120 @@ Valore restituito:
|
|||||||
* evaluated expression (must be freed by calling "free" after use), or NULL
|
* evaluated expression (must be freed by calling "free" after use), or NULL
|
||||||
if problem (invalid expression or not enough memory)
|
if problem (invalid expression or not enough memory)
|
||||||
|
|
||||||
|
// TRANSLATION MISSING
|
||||||
|
List of logical operators that can be used in conditions (by order of priority,
|
||||||
|
from first used to last):
|
||||||
|
|
||||||
|
// TRANSLATION MISSING
|
||||||
|
[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+`
|
||||||
|
|===
|
||||||
|
|
||||||
|
// TRANSLATION MISSING
|
||||||
|
List of comparison operators that can be used in conditions (by order of priority,
|
||||||
|
from first used to last):
|
||||||
|
|
||||||
|
// TRANSLATION MISSING
|
||||||
|
[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 matching 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+`
|
||||||
|
|===
|
||||||
|
|
||||||
// TRANSLATION MISSING
|
// TRANSLATION MISSING
|
||||||
List of variables expanded in expression (by order of priority, from first
|
List of variables expanded in expression (by order of priority, from first
|
||||||
expanded to last):
|
expanded to last):
|
||||||
|
@ -2014,6 +2014,120 @@ char *weechat_string_eval_expression (const char *expr,
|
|||||||
* 評価された式 (使用後には必ず "free" を呼び出して領域を開放してください)、失敗した場合は
|
* 評価された式 (使用後には必ず "free" を呼び出して領域を開放してください)、失敗した場合は
|
||||||
NULL (式が不正な場合やメモリが不足している場合)
|
NULL (式が不正な場合やメモリが不足している場合)
|
||||||
|
|
||||||
|
// TRANSLATION MISSING
|
||||||
|
List of logical operators that can be used in conditions (by order of priority,
|
||||||
|
from first used to last):
|
||||||
|
|
||||||
|
// TRANSLATION MISSING
|
||||||
|
[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+`
|
||||||
|
|===
|
||||||
|
|
||||||
|
// TRANSLATION MISSING
|
||||||
|
List of comparison operators that can be used in conditions (by order of priority,
|
||||||
|
from first used to last):
|
||||||
|
|
||||||
|
// TRANSLATION MISSING
|
||||||
|
[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 matching 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+`
|
||||||
|
|===
|
||||||
|
|
||||||
式中で展開される変数のリスト
|
式中で展開される変数のリスト
|
||||||
(優先度の高い順、展開順の早いものを上に遅いものを下に):
|
(優先度の高い順、展開順の早いものを上に遅いものを下に):
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user