String Operators (^, +, %)

InstallShield 2020 » InstallScript Language Reference

The string operators allow you to directly manipulate strings without the use of functions. Note that string operators are not case-sensitive. The InstallScript compiler supports the following string operations:

String Operators

Operation

Description

Append to Path Operator (^)

Adds additional paths to a path or a file name.

Concatenate Operator (+)

Appends one string to the end of another string.

Find String Operator (%)

Locates a substring in another string.

String Constant Operator (@)

Access a string constant that is used for one of the project’s string entries.

Note:Do not use parentheses to enclose expressions on either side of a string operator. For example, avoid statements like the following:

    szPath = szTestPath ^ (AUTOFILE + ".bat");

Instead, create expressions without parentheses for use with string operators, as shown below:

    szFile = AUTOFILE + ".bat";    szPath = szTestPath ^ szFile;