StrExpression/en: Porovnání verzí

Z Wiki
Přejít na: navigace, hledání
(Založena nová stránka s textem „'''Evaluate string expressions'''“)
 
(Není zobrazeno 31 mezilehlých verzí od 2 dalších uživatelů.)
Řádek 9: Řádek 9:
 
'''Evaluate string expressions'''
 
'''Evaluate string expressions'''
  
Vyhodnotí výraz zadaný v parametru [[#expression-| Expression]] s možností využití parametrů [[#a-| A]], [[#b-| B]], [[#c-| C]], [[#d-| D]], [[#e-| E]], [[#f-| F]], [[#g-| G]] a [[#h-| H]] jako proměnných.
+
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.
  
== Vstupní parametry ==
+
== Input parameters ==
  
 
<span id="a-"></span>
 
<span id="a-"></span>
 
=== A ===
 
=== A ===
  
Typ [[Special:MyLanguage/Datové typy#String | String]]
+
Type [[Special:MyLanguage/Data types#String | String]]
  
Proměnná A.
+
Variable A.
  
 
<span id="b-"></span>
 
<span id="b-"></span>
 
=== B ===
 
=== B ===
  
Typ [[Special:MyLanguage/Datové typy#String | String]]
+
Type [[Special:MyLanguage/Data types#String | String]]
  
Proměnná B.
+
Variable B.
  
 
<span id="c-"></span>
 
<span id="c-"></span>
 
=== C ===
 
=== C ===
  
Typ [[Special:MyLanguage/Datové typy#String | String]]
+
Type [[Special:MyLanguage/Data types#String | String]]
  
Proměnná C.
+
Variable C.
  
 
<span id="d-"></span>
 
<span id="d-"></span>
 
=== D ===
 
=== D ===
  
Typ [[Special:MyLanguage/Datové typy#String | String]]
+
Type [[Special:MyLanguage/Data types#String | String]]
  
Proměnná D.
+
Variable D.
  
 
<span id="e-"></span>
 
<span id="e-"></span>
 
=== E ===
 
=== E ===
  
Typ [[Special:MyLanguage/Datové typy#String | String]]
+
Type [[Special:MyLanguage/Data types#String | String]]
  
Proměnná E.
+
Variable E.
  
 
<span id="f-"></span>
 
<span id="f-"></span>
 
=== F ===
 
=== F ===
  
Typ [[Special:MyLanguage/Datové typy#String | String]]
+
Type [[Special:MyLanguage/Data types#String | String]]
  
Proměnná F.
+
Variable F.
  
 
<span id="g-"></span>
 
<span id="g-"></span>
 
=== G ===
 
=== G ===
  
Typ [[Special:MyLanguage/Datové typy#String | String]]
+
Type [[Special:MyLanguage/Data types#String | String]]
  
Proměnná G.
+
Variable G.
  
 
<span id="h-"></span>
 
<span id="h-"></span>
 
=== H ===
 
=== H ===
  
Typ [[Special:MyLanguage/Datové typy#String | String]]
+
Type [[Special:MyLanguage/Data types#String | String]]
  
Proměnná H.
+
Variable H.
  
 
<span id="expression-"></span>
 
<span id="expression-"></span>
 
=== Expression ===
 
=== Expression ===
  
Typ [[Special:MyLanguage/Datové typy#String | String]]
+
Type [[Special:MyLanguage/Data types#String | String]]
  
Aritmetický výraz, který může obsahovat:
+
Mathematical expression that can contain:
*Celá čísla
+
*Whole numbers
*Řetězce (např. "abc")
+
*Strings(e.g. "abc")
*Proměnné [[#a-| A]], [[#b-| B]], [[#c-| C]], [[#d-| D]], [[#e-| E]], [[#f-| F]], [[#g-| G]] a [[#h-| H]]
+
*Variables[[#a-| A]], [[#b-| B]], [[#c-| C]], [[#d-| D]], [[#e-| E]], [[#f-| F]], [[#g-| G]] a [[#h-| H]]
*Operátory (+, -, *, /, %, <, >, <=, >= , ==, !=, !, <<, >>, ^, &, |, &&, ||)
+
*Operators (+, -, *, /, %, <, >, <=, >= , ==, !=, !, <<, >>, ^, &, |, &&, ||)
*Závorky (  )
+
*Parentheses (  )
*Funkce:
+
*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 ===
  
Typ [[Special:MyLanguage/Datové typy#Number | Number]]
+
Type [[Special:MyLanguage/Data types#Number | Number]]
  
Povoluje nebo zakazuje příkaz. Při hodnotě 0 nebude příkaz proveden.
+
Enables or disables the command. If the value is 0, the command will not execute.
  
 
=== PreWait ===
 
=== PreWait ===
  
Typ [[Special:MyLanguage/Datové typy#Number | Number]]
+
Type [[Special:MyLanguage/Data types#Number | Number]]
  
Prodleva v milisekundách před provedením příkazu. Nemá žádný vliv je-li Enabled=0.
+
Delay in milliseconds before executing the command. It has no effect if Enabled=0.
  
 
=== PostWait ===
 
=== PostWait ===
  
Typ [[Special:MyLanguage/Datové typy#Number | Number]]
+
Type [[Special:MyLanguage/Data types#Number | Number]]
  
Prodleva v milisekundách po provedení příkazu. Nemá žádný vliv je-li Enabled=0.
+
Delay in milliseconds before executing the command. It has no effect if Enabled=0.
  
== Výstupní parametry ==
+
== Output parameters ==
  
 
=== ExpressionResult ===
 
=== ExpressionResult ===
  
Typ [[Special:MyLanguage/Datové typy#String | String]]
+
Type [[Special:MyLanguage/Data types#String | String]]
  
Výsledek zadaného výrazu.
+
Result of specified expression.

Aktuální verze z 4. 3. 2026, 08:56

Jiné jazyky:
English • ‎čeština

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.