IFSUBSTR        Branch to label if a substring found in a master string

Top  Previous  Next

Syntax:

IFSUBSTR

[ string ]  [ substring ]  GOTO  [ label ]

Alt Syntax:

IFSUBSTRI

[ string ]  [ substring ]  GOTO  [ label ]

Arguments:

[ string ]

Variable or string defining master string.

 

[ substring ]

Variable or string defining substring to find.

 

[ label ]

A valid label within the current script file which is branched to if the substring is contained within the master string.

Options:

none

 

 

 

This script command attempts to locate a substring with a specified master string and branches to [ label ] if it is found.

 

Use the alternate IFSUBSTRI command to perform the same comparison but to ignore case during the comparison. Unlike the UPPER and LOWER commands, IFSUBSTRI does not change the case of the strings.

 

Consider the following simple example that results in a branch to the specified label.

 

SET master_string = "abcdefg"

SET substring = "cde"

IFSUBSTR master_string substring GOTO substring_found

 

 

Note: The functionality of IFSUBSTR and IFSUBSTRI were erroneously reversed in previously releases of Robo-FTP but their current operation is as described in this document.

 

 

Related command(s): IFSTRCMP, IFNSTRCMP, IFNSUBSTR, UPPER, LOWER