Full Library / Math Operator / String Operation / StringCompare
Block Name: StringCompare
- public class StringCompare
- extends VisualSim.actor.TypedAtomicActor
Compare two strings specified either as inputs or parameters. The output is either true or false, depending on whether the comparison function is satisfied. The comparison functions are:
- equals: Output true if the strings are equal (Default).
- startsWith: Output true if firstString starts with secondString.
- endsWith: Output true if firstString ends with secondString.
- contains: Output true if firstString contains secondString.
The strings to be compared will be taken from the inputs if they are available, and otherwise will be taken from the corresponding parameters.
function
public VisualSim.data.expr.Parameter function
- The comparison function to be performed. The choices are:
- equals: Compares firstString to another secondString (Default).
- startsWith: Tests whether firstString starts with secondString.
- endsWith: Tests whether firstString ends with secondString.
- contains: Tests whether firstString contains secondString.
firstString
public VisualSim.actor.parameters.PortParameter firstString
- The input PortParameter for the first string of type string.
ignoreCase
public VisualSim.data.expr.Parameter ignoreCase
- The parameter to state whether to ignore case. This is a boolean that defaults to false.
output
public VisualSim.actor.TypedIOPort output
- The output port for the result of type BooleanToken.
secondString
public VisualSim.actor.parameters.PortParameter secondString
- The input PortParameter for the second string of type string.
Created with the Personal Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation