String Comparison Conditional Commands

The ifStr command is used to define string comparison conditional blocks. The use of ifStr is always a string comparison. If you use just if and either comparison object is not a number, the conditional will automatically be converted to ifStr and then done as a string comparison as described here. The format of a conditional block is:

ifStr (string1) (op) (string2)
  (block of commands if string comparison is true)
    .
else ifStr (string1)
  (block of commands based on converting this uniary conditional
        to "ifStr (string1) is true" including special options
        for (string1) in ' is ' comparisons)
    .
else if (num1) (op) (num2)
  (i.e., numeric "else if" blocks can be used in an ifStr block)
    .
else
  (block of commands if no prior condition is true)
endif

where there can be any number of conditionals and each can be a string comparison or a numeric comparison.

String comparison conditionals compare (string1) to (string2) with the following comparison operators for (op):

Special Handling for ' is ' Conditionals

When writing templates for browser styles, the comparison operator ' is ' looks for special keywords in (string2) that can check various things:

Alternatively, if (string2) is "true" or "false", an ' is ' conditional instead looks for the following special keywords in (string1):

If none of the above keywords are used, an ' is ' operator does a standard string comparison. In other words, it is true if (string1) is equal to (string2) by case-insensitive comparison.

Some Options for Checking with Strings

Some string functions can be used to implement other types of useful string comparisons. For example: