InstallShield 2016 ยป InstallScript Language Reference
The StrFindEx function determines whether the string passed in the parameter szFindMe is found within the string passed in the parameter szString; the function begins its search at the location specified by nStart. If szFindMe is found, StrFind returns the position within szString of the first character of szFindMe. This function is not case-sensitive and can be used only to find the first occurrence of szFindMe in szString.
Syntax
StrFindEx ( szString, szFindMe, nStart );
Parameters
Parameter |
Description |
szString |
Specifies the string to search. |
szFindMe |
Specifies the string to find in szString. |
nStart |
Specifies an offset into szString that identifies the character at which to begin the search for szFindMe. Note that the position of the first character in szString is 0 (zero). |
Return Values
Return Value |
Description |
X |
If szString contains szFindMe, X is the numeric position of the first character in szFindMe. The first character in szString is in position 0 (zero). |
< 0 |
Indicates szString does not contain szFindMe. |
Additional Information
In the example below, StrFind will return the value 19.
nStartPos = StrFind("Scripting means having fun","ing",7);
If you need only a TRUE or FALSE return value indicating whether one string contains another string, (that is, if the location if the substring is unimportant), use the string find operator (%) as shown below:
if (szString % szFindMe) then ...
You can use the string find operator (%) only in Boolean expressions that are resolved in if statements. You cannot use it in repeat statements or while statements.
See Also
InstallShield 2016 Help LibraryMay 2017 |
Copyright Information | Flexera Software |