AppCtrlScript

MAY Computer

Help

INSTRING

Applies to  

AppCtrlScript (Module: wmACScr1.dll)

Group  

String

See also  

LEFT, RIGHT, MID

Retrieve starting position of a substring within another string. Searches a string for the occurrence of a substring. If the string can be found then the position where the substring starts is stored as result in the script variable. If the substring cannot be found in the source string, the result is 0.

Syntax

INSTR[ING] <VariableName>, <Source>, <SearchString>[, <StartPos>][, <CaseSense>]

Part

Description

<VariableName> Script variable where to store the result (position in source where <SearchString> has been found).
<Source> Source string maybe containing <SearchString>.
<SearchString> String to be searched for in the source string.
<StartPos> Character position in the source where to start searching; default is 1.
<CaseSense> 0|1; if 1 the search is case sensitive. Default is 0.