Stacks API

Come build with us.
Stacks API v10 for Stacks 3.5


  <   Templates Variable Reference


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

evaluates to true especially for Yoda

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