$intIndex = Index ( <Target
string>, <Search string> )
Finds a character
or substring inside a larger string.
Parameters
<Target string> The main string which has to be searched for the existence of a substring.
<Search string> The string or the character to be searched for.
Return Value
Returns the zero based index of the first character in the "Target string"
that matches the requested substring or character, returns -1 if the substring
or character is not found.
Remarks
- Find ()
function is similar to Index () function and has the same
syntax.
Example
$Var = "Ivr Solutions"
$result = Index($Var,"Sol")