ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Core.Data.VBFunctionLib Assembly / GrapeCity.Enterprise.Data.VisualBasicReplacement Namespace / Strings Class / InStr Method / InStr(Int32,String,String,CompareMethod) Method
Optional. Numeric expression that sets the starting position for each search. If omitted, search begins at the first character position. The start index is 1-based.
Required. String expression being searched.
Required. String expression sought.
Optional. Specifies the type of string comparison. If compare is omitted, the Option Compare setting determines the type of comparison.

In This Topic
    InStr(Int32,String,String,CompareMethod) Method
    In This Topic
    Returns an integer specifying the start position of the first occurrence of one string within another.
    Syntax
    'Declaration
     
    Public Overloads Shared Function InStr( _
       ByVal start As Integer, _
       ByVal string1 As String, _
       ByVal string2 As String, _
       Optional ByVal compare As CompareMethod _
    ) As Integer
    public static int InStr( 
       int start,
       string string1,
       string string2,
       CompareMethod compare
    )

    Parameters

    start
    Optional. Numeric expression that sets the starting position for each search. If omitted, search begins at the first character position. The start index is 1-based.
    string1
    Required. String expression being searched.
    string2
    Required. String expression sought.
    compare
    Optional. Specifies the type of string comparison. If compare is omitted, the Option Compare setting determines the type of comparison.

    Return Value

    If string1 is zero length or Nothing, InStr returns 0. If string2 is zero length or Nothing, InStr returns start. If string2 is not found, InStr returns 0. If string2 is found within string1, InStr returns position where match begins. If start > string2, InStr returns 0.
    See Also