Class ByteArrayExtensions
This extension class enables some convenient methods to deal with byte array.
Inherited Members
Namespace: Libplanet.Common
Assembly: Libplanet.Common.dll
Syntax
public static class ByteArrayExtensions
Methods
| Improve this Doc View SourceIndexOf(Byte[], Byte[])
This extension class enables some convenient methods to deal with byte array.
Declaration
[Pure]
public static int IndexOf(this byte[] bytes, byte[] sub)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | bytes | |
Byte[] | sub |
Returns
Type | Description |
---|---|
Int32 |
StartsWith(Byte[], Byte[])
Determines whether the beginning of this byte array instance matches a specified string.
Declaration
[Pure]
public static bool StartsWith(this byte[] bytes, byte[] prefix)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | bytes | A byte array to check. |
Byte[] | prefix | The prefix byte array to compare. |
Returns
Type | Description |
---|---|
Boolean | true if |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|