Provides conversion to/from hexadecimal representation.
Namespace: DotNext.Buffers.Text Assembly: DotNext.dll Syntax Methods | Edit this page View Source DecodeFromUtf16(ReadOnlySpan<char>, Span<byte>)Decodes hexadecimal representation of bytes.
Declarationpublic static int DecodeFromUtf16(ReadOnlySpan<char> chars, Span<byte> output)
Parameters Type Name Description ReadOnlySpan<char> chars
The hexadecimal representation of bytes.
Span<byte> outputThe output buffer used to write decoded bytes.
Returns Type Description intThe actual number of bytes in output
written by the method.
Decodes hexadecimal representation of bytes.
Declarationpublic static int DecodeFromUtf8(ReadOnlySpan<byte> chars, Span<byte> output)
Parameters Type Name Description ReadOnlySpan<byte> chars
The hexadecimal representation of bytes.
Span<byte> outputThe output buffer used to write decoded bytes.
Returns Type Description intThe actual number of bytes in output
written by the method.
Converts set of bytes into hexadecimal representation.
Declarationpublic static string EncodeToUtf16(ReadOnlySpan<byte> bytes, bool lowercased = false)
Parameters Type Name Description ReadOnlySpan<byte> bytes
The bytes to convert.
bool lowercasedtrue to return lowercased hex string; false to return uppercased hex string.
Returns Type Description stringThe hexadecimal representation of bytes.
| Edit this page View Source EncodeToUtf16(ReadOnlySpan<byte>, Span<char>, bool)Converts set of bytes into hexadecimal representation.
Declarationpublic static int EncodeToUtf16(ReadOnlySpan<byte> bytes, Span<char> output, bool lowercased = false)
Parameters Type Name Description ReadOnlySpan<byte> bytes
The bytes to convert.
Span<char> outputThe buffer used to write hexadecimal representation of bytes.
bool lowercasedtrue to return lowercased hex string; false to return uppercased hex string.
Returns Type Description intThe actual number of characters in output
written by the method.
Converts set of bytes into hexadecimal representation.
Declarationpublic static byte[] EncodeToUtf8(ReadOnlySpan<byte> bytes, bool lowercased = false)
Parameters Type Name Description ReadOnlySpan<byte> bytes
The bytes to convert.
bool lowercasedtrue to return lowercased hex string; false to return uppercased hex string.
Returns Type Description byte[]The hexadecimal representation of bytes.
| Edit this page View Source EncodeToUtf8(ReadOnlySpan<byte>, Span<byte>, bool)Converts set of bytes into hexadecimal representation.
Declarationpublic static int EncodeToUtf8(ReadOnlySpan<byte> bytes, Span<byte> output, bool lowercased = false)
Parameters Type Name Description ReadOnlySpan<byte> bytes
The bytes to convert.
Span<byte> outputThe buffer used to write hexadecimal representation of bytes, in UTF-8 encoding.
bool lowercasedtrue to return lowercased hex string; false to return uppercased hex string.
Returns Type Description intThe actual number of characters in output
written by the method.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4