Fortinet black logo

Handbook

Operators

Operators

Lua operators lists the FortiADC operators.

Lua operators

FortiADC Operator Operator sub-type Description
- + Arithmetic Unary minus, unary plus.
~ Bitwise Bitwise NOT.
not Logical Performs a logical "not" on a value.
* / % Arithmetic Multiple, divide, remainder.
// Floor division.
^ Exponentiation.
+ - Arithmetic Add and subtract.
<< >> Bitwise Left and right shift.
< > <= >= Relational Boolean less, greater, less than or equal, and greater than or equal.
== != Relational Boolean equal and not equal.
& Bitwise Bitwise AND.
~ Bitwise Bitwise exclusive OR.
| Bitwise Bitwise OR.
and Logical Performs a logical "and" comparison between two values.
or Logical Performs a logical "or" comparison between two values.
starts_with(a,b) String Tests to see if String a starts with String b. Returns true or false.
ends_with(a,b) String Tests to see if String a ends with String b. Returns true or false.
contains String Checks to see whether String a contains String b. Returns true or false.
match String Searches for a specified string.
.. The string concatenation operator in Lua is denoted by two dots ('..'). If both operands are strings or numbers, then they are converted to a string. It's the same as __concat.

Operators

Lua operators lists the FortiADC operators.

Lua operators

FortiADC Operator Operator sub-type Description
- + Arithmetic Unary minus, unary plus.
~ Bitwise Bitwise NOT.
not Logical Performs a logical "not" on a value.
* / % Arithmetic Multiple, divide, remainder.
// Floor division.
^ Exponentiation.
+ - Arithmetic Add and subtract.
<< >> Bitwise Left and right shift.
< > <= >= Relational Boolean less, greater, less than or equal, and greater than or equal.
== != Relational Boolean equal and not equal.
& Bitwise Bitwise AND.
~ Bitwise Bitwise exclusive OR.
| Bitwise Bitwise OR.
and Logical Performs a logical "and" comparison between two values.
or Logical Performs a logical "or" comparison between two values.
starts_with(a,b) String Tests to see if String a starts with String b. Returns true or false.
ends_with(a,b) String Tests to see if String a ends with String b. Returns true or false.
contains String Checks to see whether String a contains String b. Returns true or false.
match String Searches for a specified string.
.. The string concatenation operator in Lua is denoted by two dots ('..'). If both operands are strings or numbers, then they are converted to a string. It's the same as __concat.