Hunny Software Library Reference

ByteString.LastIndexOfAny Method (Byte[], Int32)

Reports the index of the last occurrence of any byte in a specified set of bytes.

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

Parameters

anyOf
byte array containing the set of bytes to seek
startIndex
starting position of the search

Return Value

largest index less than or equal to startIndex where any byte in anyOf was found;
-1 if no byte in anyOf was found

Exceptions

Exception TypeCondition
ArgumentNullExceptionanyOf is null
ArgumentOutOfRangeExceptionstartIndex < 0;
or startIndex > Length

See Also

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