ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Core.Data.VBFunctionLib Assembly / GrapeCity.Enterprise.Data.VisualBasicReplacement Namespace / Strings Class / InStr Method / InStr(String,String,CompareMethod) Method
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(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 string1 As String, _
       ByVal string2 As String, _
       Optional ByVal compare As CompareMethod _
    ) As Integer
    public static int InStr( 
       string string1,
       string string2,
       CompareMethod compare
    )

    Parameters

    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 not found, InStr returns 0. If string2 is found within string1, InStr returns position where match begins.
    See Also