InStr Function [Runtime] /text/sbasic/shared/03120401.xhp Sun Microsystems, Inc. converted from old format - fpe
InStr;function InStr Function [Runtime] Returns the position of a string within another string.
The Instr function returns the position at which the match was found. If the string was not found, the function returns 0. Syntax: InStr ([Start As Integer,] Text1 As String, Text2 As String[, Compare]) Return value: Integer Parameters: Start: Any numeric expression that marks the position in a string at which to start searching for the specified substring. If this parameter is omitted, the search starts at the first character. Text1: The string expression that you want to search. Text2: The string expression that you want to search for. Compare: Optional numeric expression that defines the type of comparison. This parameter can be 0 or 1. The default value 1 specifies a text comparison (not case-sensitive). The value 0 specifies a binary comparison (text is compared case-sensitive).UFI: fixes #i17929# To avoid a run-time error, do not set the Compare parameter if the first return parameter is omitted. Example: Sub ExamplePosition Dim sInput As String Dim iPos as Integer sInput = "Star Office" iPos = Instr(sInput,"v") print iPos end sub