Full Library / Math Operator / String Operation / StringIndexOf
Block Name: StringIndexOf
- public class StringIndexOf
- extends VisualSim.actor.TypedAtomicActor
Output the index of a searchFor string contained in a given inText. The search begins at the index given by startIndex and ends at either the end or the beginning of the string, depending on whether searchForwards is true or false, respectively. If the string is not found, then the output is -1. If the string is found, then the output is the index of the start of the string, where index 0 refers to the first character in the string.
ignoreCase
public VisualSim.data.expr.Parameter ignoreCase
- The parameter to state whether to ignore case. This is a boolean that defaults to false.
inText
public VisualSim.actor.parameters.PortParameter inText
- Port and parameter specifying the string that will be searched. This has type string and defaults to the empty string.
output
public VisualSim.actor.TypedIOPort output
- Output producing the index of the searchFor string, if it is found, and -1 otherwise. This has type int.
searchFor
public VisualSim.actor.parameters.PortParameter searchFor
- Port and parameter specifying a string to find in the inText string. This has type string and defaults to an empty string.
searchForwards
public VisualSim.data.expr.Parameter searchForwards
- Boolean parameter indicating the direction in which to search. This is true to find the first occurrence and false to find the last. The default value is true.
startIndex
public VisualSim.actor.parameters.PortParameter startIndex
- Port and parameter that determines where to start the search. This has type int and defaults to 0.
Created with the Personal Edition of HelpNDoc: Easily create CHM Help documents