Stacks API

Come build with us.
Stacks API v6 for Stacks 2.5


  <   Templates Variable Reference


String Comparison



This content is open source. You can edit it and submit a pull request on GitHub.
This page is generated from this file.


© . YourHead Software all rights reserved.

String Comparison



Available: Stacks API v3

Usage

%( "<string1>" <operator> "<string2>" )%

Description

Inline string comparison operations can evaluate equality of strings. The output of the operation is a boolean true or false, so this can be used in combination with Integer Math.

Example 1: compare to literal strings.

evaluates to false:

%("Red"=="Blue")%

Example 2: compare a property with a literal string

evaluates to true unless the user selects the droid you were looking for from the popup:

%( "%id=mySelect%" != "DroidYouLookedFor" )%

Example 3: compare a property with a literal string

evalutes to true especially for Yoda

%( 
   %( 
      %( "%id=value%" == "Do" )% || 
      %( "%id=value%" != "Do" )% 
   )% && 
   %( "%id=value%" != "Try" )% 
)%
© . YourHead Software all rights reserved.