ActiveReports 12
InStr(String,String,CompareMethod) Method

GrapeCity.ActiveReports.v12 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.
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 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

Reference

Strings Class
Strings Members
Overload List