StrExpression/en: Porovnání verzí
(Založena nová stránka s textem „Evaluates the expression given in the Expression parameter with the option of using parameters A, B, C, #d-|…“) |
|||
| (Není zobrazeno 30 mezilehlých verzí od 2 dalších uživatelů.) | |||
| Řádek 11: | Řádek 11: | ||
Evaluates the expression given in the [[#expression-| Expression]] parameter with the option of using parameters [[#a-| A]], [[#b-| B]], [[#c-| C]], [[#d-| D]], [[#e-| E]], [[#f-| F]], [[#g-| G]] and [[#h-| H]] as variables. | Evaluates the expression given in the [[#expression-| Expression]] parameter with the option of using parameters [[#a-| A]], [[#b-| B]], [[#c-| C]], [[#d-| D]], [[#e-| E]], [[#f-| F]], [[#g-| G]] and [[#h-| H]] as variables. | ||
| − | == | + | == Input parameters == |
<span id="a-"></span> | <span id="a-"></span> | ||
=== A === | === A === | ||
| − | + | Type [[Special:MyLanguage/Data types#String | String]] | |
| − | + | Variable A. | |
<span id="b-"></span> | <span id="b-"></span> | ||
=== B === | === B === | ||
| − | + | Type [[Special:MyLanguage/Data types#String | String]] | |
| − | + | Variable B. | |
<span id="c-"></span> | <span id="c-"></span> | ||
=== C === | === C === | ||
| − | + | Type [[Special:MyLanguage/Data types#String | String]] | |
| − | + | Variable C. | |
<span id="d-"></span> | <span id="d-"></span> | ||
=== D === | === D === | ||
| − | + | Type [[Special:MyLanguage/Data types#String | String]] | |
| − | + | Variable D. | |
<span id="e-"></span> | <span id="e-"></span> | ||
=== E === | === E === | ||
| − | + | Type [[Special:MyLanguage/Data types#String | String]] | |
| − | + | Variable E. | |
<span id="f-"></span> | <span id="f-"></span> | ||
=== F === | === F === | ||
| − | + | Type [[Special:MyLanguage/Data types#String | String]] | |
| − | + | Variable F. | |
<span id="g-"></span> | <span id="g-"></span> | ||
=== G === | === G === | ||
| − | + | Type [[Special:MyLanguage/Data types#String | String]] | |
| − | + | Variable G. | |
<span id="h-"></span> | <span id="h-"></span> | ||
=== H === | === H === | ||
| − | + | Type [[Special:MyLanguage/Data types#String | String]] | |
| − | + | Variable H. | |
<span id="expression-"></span> | <span id="expression-"></span> | ||
=== Expression === | === Expression === | ||
| − | + | Type [[Special:MyLanguage/Data types#String | String]] | |
| − | + | Mathematical expression that can contain: | |
| − | * | + | *Whole numbers |
| − | * | + | *Strings(e.g. "abc") |
| − | * | + | *Variables[[#a-| A]], [[#b-| B]], [[#c-| C]], [[#d-| D]], [[#e-| E]], [[#f-| F]], [[#g-| G]] a [[#h-| H]] |
| − | * | + | *Operators (+, -, *, /, %, <, >, <=, >= , ==, !=, !, <<, >>, ^, &, |, &&, ||) |
| − | * | + | *Parentheses ( ) |
| − | * | + | *Functions: |
::length(string str) | ::length(string str) | ||
::pos(string str, string substr) | ::pos(string str, string substr) | ||
| Řádek 92: | Řádek 92: | ||
::if(bool condition, string then, string else) | ::if(bool condition, string then, string else) | ||
::strip_diacritics(string str) | ::strip_diacritics(string str) | ||
| + | ::regex_match(string text, string expression) | ||
| + | ::regex_match(string text, string expression, int group) | ||
| + | ::regex_search(string text, string expression) | ||
| + | ::regex_search(string text, string expression, int group) | ||
| + | ::regex_replace(string text, string expression, string replacement) | ||
| + | ::regex_replace(string text, string expression, string replacement, bool replace_all) | ||
| + | ::toTimestamp(string str, string format) | ||
| + | ::formatTimestamp(int epochTime, string format) | ||
=== Enabled === | === Enabled === | ||
| − | + | Type [[Special:MyLanguage/Data types#Number | Number]] | |
| − | + | Enables or disables the command. If the value is 0, the command will not execute. | |
=== PreWait === | === PreWait === | ||
| − | + | Type [[Special:MyLanguage/Data types#Number | Number]] | |
| − | + | Delay in milliseconds before executing the command. It has no effect if Enabled=0. | |
=== PostWait === | === PostWait === | ||
| − | + | Type [[Special:MyLanguage/Data types#Number | Number]] | |
| − | + | Delay in milliseconds before executing the command. It has no effect if Enabled=0. | |
| − | == | + | == Output parameters == |
=== ExpressionResult === | === ExpressionResult === | ||
| − | + | Type [[Special:MyLanguage/Data types#String | String]] | |
| − | + | Result of specified expression. | |
Aktuální verze z 4. 3. 2026, 08:56
Obsah
Description
Alias: SE
Evaluate string expressions
Evaluates the expression given in the Expression parameter with the option of using parameters A, B, C, D, E, F, G and H as variables.
Input parameters
A
Type String
Variable A.
B
Type String
Variable B.
C
Type String
Variable C.
D
Type String
Variable D.
E
Type String
Variable E.
F
Type String
Variable F.
G
Type String
Variable G.
H
Type String
Variable H.
Expression
Type String
Mathematical expression that can contain:
- Whole numbers
- Strings(e.g. "abc")
- Variables A, B, C, D, E, F, G a H
- Operators (+, -, *, /, %, <, >, <=, >= , ==, !=, !, <<, >>, ^, &, |, &&, ||)
- Parentheses ( )
- Functions:
- length(string str)
- pos(string str, string substr)
- substr(string str, int offset)
- substr(string str, int offset, int length)
- trim(string str)
- replace(string str, string from, string to)
- replace(string str, string from, string to, bool replace_all)
- lowercase(string str)
- uppercase(string str)
- if(bool condition, string then, string else)
- strip_diacritics(string str)
- regex_match(string text, string expression)
- regex_match(string text, string expression, int group)
- regex_search(string text, string expression)
- regex_search(string text, string expression, int group)
- regex_replace(string text, string expression, string replacement)
- regex_replace(string text, string expression, string replacement, bool replace_all)
- toTimestamp(string str, string format)
- formatTimestamp(int epochTime, string format)
Enabled
Type Number
Enables or disables the command. If the value is 0, the command will not execute.
PreWait
Type Number
Delay in milliseconds before executing the command. It has no effect if Enabled=0.
PostWait
Type Number
Delay in milliseconds before executing the command. It has no effect if Enabled=0.
Output parameters
ExpressionResult
Type String
Result of specified expression.