Command Reference

Get Delimited String

This action will return a specific entry in a delimited string given a delimiter and a zero-based index.

If the index is greater than the number of entries in the delimited string, the action returns an empty string ("").

Action ID: 71
Action Category: Strings

Settings

Store result in variable:

The name of the variable to store the result in.

Source String

The source string, that contains a delimited list.

Delimiter

The character(s) that delimit the supplied list.

Item index

The zero-based index of the item to return.

Return Values

None.

Example

In this example, we will get the first occurrence of a file from a comma-separated list.

We have already searched the User's hard drive for all .sf6 files and stored the results in the variable %SF6Files%. Now we will get the first occurrence (the first .sf6 file found). We will be able to use this information to ask the user if they would like to use this path as the installation directory.

We will store the first occurrence in our variable: %FirstPath%

Store result in variable: %FirstPath%
Source string: %SF6Files%
Delimiter: ,
Item index: 0

 

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