Collation.IndexOf MethodCollation.IndexOf MethodCollation::IndexOf Method

Returns the index of the first occurrence of a stringStringString within another stringStringString under this collation.

Syntax

Public MustOverride Function IndexOf( _
    value As String, _
    substring As String _
) As Integer
public abstract int IndexOf(
    string value,
    string substring
)
public:
virtual int IndexOf(
    String^ value, 
    String^ substring
) abstract
 

Return Value

Type: System.Int32System.Int32System::Int32

The index of the first occurrence of substring within value if found; otherwise -1.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException value or substring is null a null reference (Nothing in Visual Basic) nullptr.

Remarks

This method is used by the fn:contains function under this collation.