Command Reference

Find String

Finds the location of a sub-string in a string.

Action ID: 30
Action Category: Strings

Settings

Store result in variable

The variable that the result will be stored in. The result will be a zero-based index describing the position where the sub-string was found in the string. The result will be -1 if the sub-string was not found.

Search in

The string to search in.

Search for

The sub-string to search for.

Start at position

A zero-based position in the Search in string to start searching from. Use -1 to start searching from the last character in the Search in string.

Search direction

Determines whether to search forward (to the right) or backward (to the left) from the Start at position.

Search is case sensitive

If checked, the search will be case sensitive.

Return Values

None.

Example

The following command will find the last backslash ("\") in a path (e.g. "C:\Program Files\Program X\Program.exe"). This could be useful if you want to strip the file name off of a path and return just the directory name.

Store result in variable: %LastSlashPosition%
Search in: %MyPath%
Search for: \
Start at position: -1
Search direction: Backward
Search is case sensitive: FALSE

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab