Operators Documentation
Here is a full list of comparison, mathematical, and special operators used in X3.
Comparison Operators
| Operator | Description | Example |
| == | Equal to | if $a == $b |
| != | Not equal to | if $a != $b |
| > | Greater than | if $a > $b |
| < | Less than | if $a < $b |
| >= | Greater than or equal | if $a >= $b |
| <= | Less than or equal | if $a <= $b |
Removed Comparison operators
| is | Checks if two variables reference the same object | if $a is $b |
| is not | Checks if two variables reference different objects | if $a is not $b |
| != | Strict inequality (not identical) | if $a !== $b |
String Operators
| Operator | Description | Example |
| startswith | Checks if a string starts with another | if $text startswith "Hello" |
| contains | Checks if a string contains another | if $text contains "lo" |
| ==ic | Case-insensitive equality | if $text ==ic "HELLO" |
| |+| | String equality in percentage | if ($a |+| $b)==50 |
Removed String operators
| endswith | Checks if a string ends with another | if $text endswith "World" |