IR Framework

String.inStr Method

Returns the position of the first occurrence of a string the string.
object.inStr (start, searchstring[, compare])

Arguments

object
Required. Always the name of a String object.


start
Required. Numeric expression that sets the starting position for each search. If omitted, search begins at the first character position. If start contains Null, an error occurs.


searchstring
Required. String expression searched for.


compare
Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. If 1, a textual comparison is performed. If 0 or omitted, a binary comparison is performed.




Return Value

The String.inStr method returns the location of the first instance of searchstring within string.


Remarks

The following example illustrates the use of the String.trim method.

Alert("Hello, world!".inStr(0, "Wo", 1);


Requirements

rTrim(), lTrim()