Class Helper
Class to manipulate decoded strings and arrays.
Inheritance
System.Object
Helper
Namespace: OnixS.SimpleBinaryEncoding
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public static class Helper : object
Methods
CopyBackward(ReadOnlySpan<Byte>, Span<Byte>)
Copy bytes in the backward direction.
Declaration
public static void CopyBackward(ReadOnlySpan<byte> source, Span<byte> destination)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<System.Byte> | source | Source buffer. |
Span<System.Byte> | destination | Destination buffer. |
CopyForward(ReadOnlySpan<Byte>, Span<Byte>)
Copy bytes in the forward direction.
Declaration
public static void CopyForward(ReadOnlySpan<byte> source, Span<byte> destination)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<System.Byte> | source | Source buffer. |
Span<System.Byte> | destination | Destination buffer. |
CopyString(String, Span<Byte>)
Copy string value from a string to buffer.
Declaration
public static void CopyString(string source, Span<byte> destination)
Parameters
Type | Name | Description |
---|---|---|
System.String | source | Source string. |
Span<System.Byte> | destination | Destination buffer. |
GetRealLength(ReadOnlySpan<Byte>)
Gets length of a null-terminated string.
Declaration
public static int GetRealLength(ReadOnlySpan<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<System.Byte> | buffer | Pointer to buffer. |
Returns
Type | Description |
---|---|
System.Int32 | Length of a null-terminated string. |