Hunny Software Library Reference

ByteString.IndexOf Method (Byte, Int32)

Reports the index of the first occurrence of the specified byte in this instance.

[Visual Basic]
Overloads Public Function IndexOf( _
   ByVal by As Byte, _
   ByVal startIndex As Integer _
) As Integer
[C#]
public int IndexOf(
   byte by,
   int startIndex
);

Parameters

by
a byte value to seek
startIndex
starting position of the search

Return Value

position in this instance where by was found;
-1 if by was not found.

Remarks

Index numbering starts from zero.

The search ranges from startIndex to the end of the string.

Exceptions

Exception TypeCondition
ArgumentOutOfRangeExceptionstartIndex < 0
or startIndex > Length

See Also

ByteString Class | Hunny.Base Namespace | ByteString.IndexOf Overload List