Converts base data types to an xtd::array of bytes, and an xtd::array of bytes to base data types.
| Little-endian | D2-02-96-49 |
| Big-endian | 49-96-02-D2 |
Public Types | |
| enum class | endian { little , big } |
| Represents the xtd::byte order ("endianness") in which data is stored in this computer architecture. More... | |
Public Fields | |
| static constexpr bool | is_big_endian |
| Indicates the xtd::byte order ("endianness") in which data is stored in this computer architecture. | |
| static constexpr bool | is_little_endian |
| Indicates the xtd::byte order ("endianness") in which data is stored in this computer architecture. | |
| static constexpr endian | endianness |
| Indicates the xtd::byte order ("endianness") in which data is stored in this computer architecture. | |
Public Static Methods | |
| static auto | double_to_int64_bits (double value) noexcept -> xtd::int64 |
| Converts the specified double-precision floating point number to a 64-bit signed integer. | |
| static auto | get_bytes (bool value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified Boolean value as an xtd::array of bytes. | |
| static auto | get_bytes (char value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified char value as an xtd::array of bytes. | |
| static auto | get_bytes (char8 value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified xtd::char8 value as an xtd::array of bytes. | |
| static auto | get_bytes (char16 value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified xtd::char16 value as an xtd::array of bytes. | |
| static auto | get_bytes (char32 value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified xtd::char32 value as an xtd::array of bytes. | |
| static auto | get_bytes (wchar value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified wchar value as an xtd::array of bytes. | |
| static auto | get_bytes (double value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified double value as an xtd::array of bytes. | |
| static auto | get_bytes (sbyte value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified xtd::byte value as an xtd::array of bytes. | |
| static auto | get_bytes (int16 value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified int16 value as an xtd::array of bytes. | |
| static auto | get_bytes (int32 value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified int32 value as an xtd::array of bytes. | |
| static auto | get_bytes (int64 value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified int64 value as an xtd::array of bytes. | |
| static auto | get_bytes (float value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified single value as an xtd::array of bytes. | |
| static auto | get_bytes (xtd::byte value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified xtd::byte value as an xtd::array of bytes. | |
| static auto | get_bytes (uint16 value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified uint16 value as an xtd::array of bytes. | |
| static auto | get_bytes (uint32 value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified uint32 value as an xtd::array of bytes. | |
| static auto | get_bytes (uint64 value) noexcept -> xtd::array< xtd::byte > |
| Returns the specified uint64 value as an xtd::array of bytes. | |
| static auto | int32_bits_to_single (int32 value) noexcept -> xtd::single |
| Converts the specified 32-bit signed integer to a single-precision floating point number. | |
| static auto | int64_bits_to_double (int64 value) noexcept -> double |
| Converts the specified 64-bit signed integer to a double-precision floating point number. | |
| static auto | single_to_int32_bits (float value) noexcept -> xtd::int32 |
| Converts the specified single-precision floating point number to a 32-bit signed integer. | |
| static auto | to_boolean (const xtd::array< xtd::byte > &value, xtd::size start_index) -> bool |
| Returns a Boolean value converted from one xtd::byte at a specified position in a xtd::byte xtd::array. | |
| static auto | to_boolean (const read_only_span< xtd::byte > &value, xtd::size start_index) -> bool |
| Returns a Boolean value converted from one xtd::byte at a specified position in a xtd::byte xtd::read_only_span. | |
| static auto | to_char (const xtd::array< xtd::byte > &value, xtd::size start_index) -> xtd::char32 |
| Returns a char32 converted from two bytes at a specified position in a xtd::byte xtd::array. | |
| static auto | to_char (const read_only_span< xtd::byte > &value, xtd::size start_index) -> xtd::char32 |
| Returns a char32 converted from two bytes at a specified position in a xtd::byte xtd::read_only_span. | |
| static auto | to_double (const xtd::array< xtd::byte > &value, xtd::size start_index) -> double |
| Returns a double-precision floating point number converted from eight bytes at a specified position in a xtd::byte xtd::array. | |
| static auto | to_double (const read_only_span< xtd::byte > &value, xtd::size start_index) -> double |
| Returns a double-precision floating point number converted from eight bytes at a specified position in a xtd::byte xtd::read_only_span. | |
| static auto | to_int16 (const xtd::array< xtd::byte > &value, xtd::size start_index) -> xtd::int16 |
| Returns a 16-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::array. | |
| static auto | to_int16 (const read_only_span< xtd::byte > &value, xtd::size start_index) -> xtd::int16 |
| Returns a 16-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::read_only_span. | |
| static auto | to_int32 (const xtd::array< xtd::byte > &value, xtd::size start_index) -> xtd::int32 |
| Returns a 32-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::array. | |
| static auto | to_int32 (const read_only_span< xtd::byte > &value, xtd::size start_index) -> xtd::int32 |
| Returns a 32-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::read_only_span. | |
| static auto | to_int64 (const xtd::array< xtd::byte > &value, xtd::size start_index) -> xtd::int64 |
| Returns a 64-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::array. | |
| static auto | to_int64 (const read_only_span< xtd::byte > &value, xtd::size start_index) -> xtd::int64 |
| Returns a 64-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::read_only_span. | |
| static auto | to_single (const xtd::array< xtd::byte > &value, xtd::size start_index) -> xtd::single |
| Returns a single-precision floating point number converted from eight bytes at a specified position in a xtd::byte xtd::array. | |
| static auto | to_single (const read_only_span< xtd::byte > &value, xtd::size start_index) -> xtd::single |
| Returns a single-precision floating point number converted from eight bytes at a specified position in a xtd::byte xtd::read_only_span. | |
| static auto | to_uint16 (const xtd::array< xtd::byte > &value, xtd::size start_index) -> xtd::uint16 |
| Returns a 16-bit unsigned integer converted from two bytes at a specified position in a xtd::byte xtd::array. | |
| static auto | to_uint16 (const read_only_span< xtd::byte > &value, xtd::size start_index) -> xtd::uint16 |
| Returns a 16-bit unsigned integer converted from two bytes at a specified position in a xtd::byte xtd::read_only_span. | |
| static auto | to_uint32 (const xtd::array< xtd::byte > &value, xtd::size start_index) -> xtd::uint32 |
| Returns a 32-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::array. | |
| static auto | to_uint32 (const read_only_span< xtd::byte > &value, xtd::size start_index) -> xtd::uint32 |
| Returns a 32-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::read_only_span. | |
| static auto | to_uint64 (const xtd::array< xtd::byte > &value, xtd::size start_index) -> xtd::uint64 |
| Returns a 64-bit unsigned integer converted from two bytes at a specified position in a xtd::byte xtd::array. | |
| static auto | to_uint64 (const read_only_span< xtd::byte > &value, xtd::size start_index) -> xtd::uint64 |
| Returns a 64-bit unsigned integer converted from two bytes at a specified position in a xtd::byte xtd::read_only_span. | |
| static auto | to_size (const xtd::array< xtd::byte > &value, xtd::size start_index) -> xtd::size |
| Returns a xtd::size converted from two bytes at a specified position in a xtd::byte xtd::array. | |
| static auto | to_size (const read_only_span< xtd::byte > &value, xtd::size start_index) -> xtd::size |
| Returns a sxtd::ize converted from two bytes at a specified position in a xtd::byte xtd::read_only_span. | |
| static auto | to_string (const xtd::array< xtd::byte > &value) -> xtd::string |
| Converts the numeric value of each element of a specified xtd::array of bytes to its equivalent hexadecimal xtd::string representation. | |
| static auto | to_string (const read_only_span< xtd::byte > &value) -> xtd::string |
| Converts the numeric value of each element of a specified xtd::array of bytes to its equivalent hexadecimal xtd::string representation. | |
| static auto | to_string (const xtd::array< xtd::byte > &value, xtd::size start_index) -> xtd::string |
| Converts the numeric value of each element of a specified sub xtd::array of bytes to its equivalent hexadecimal xtd::string representation. | |
| static auto | to_string (const read_only_span< xtd::byte > &value, xtd::size start_index) -> xtd::string |
| Converts the numeric value of each element of a specified sub xtd::array of bytes to its equivalent hexadecimal xtd::string representation. | |
| static auto | to_string (const xtd::array< xtd::byte > &value, xtd::size start_index, xtd::size length) -> xtd::string |
| Converts the numeric value of each element of a specified sub xtd::array of bytes to its equivalent hexadecimal xtd::string representation. | |
| static auto | to_string (const read_only_span< xtd::byte > &value, xtd::size start_index, xtd::size length) -> xtd::string |
| Converts the numeric value of each element of a specified sub xtd::array of bytes to its equivalent hexadecimal xtd::string representation. | |
|
strong |
Represents the xtd::byte order ("endianness") in which data is stored in this computer architecture.
| Enumerator | |
|---|---|
| little | Represnets "Little-endian" order. |
| big | Represnets "Big-endian" order. |
|
staticnodiscardnoexcept |
Converts the specified double-precision floating point number to a 64-bit signed integer.
| value | The number to convert. |
|
staticnodiscardnoexcept |
Returns the specified Boolean value as an xtd::array of bytes.
| value | A Boolean value. |
|
staticnodiscardnoexcept |
Returns the specified char value as an xtd::array of bytes.
| value | A char value. |
|
staticnodiscardnoexcept |
Returns the specified xtd::char8 value as an xtd::array of bytes.
| value | A xtd::char8 value. |
|
staticnodiscardnoexcept |
Returns the specified xtd::char16 value as an xtd::array of bytes.
| value | A xtd::char16 value. |
|
staticnodiscardnoexcept |
Returns the specified xtd::char32 value as an xtd::array of bytes.
| value | A xtd::char32 value. |
|
staticnodiscardnoexcept |
Returns the specified wchar value as an xtd::array of bytes.
| value | A wchar value. |
|
staticnodiscardnoexcept |
Returns the specified double value as an xtd::array of bytes.
| value | A double value. |
|
staticnodiscardnoexcept |
Returns the specified xtd::byte value as an xtd::array of bytes.
| value | A xtd::byte value. |
|
staticnodiscardnoexcept |
Returns the specified int16 value as an xtd::array of bytes.
| value | A int16 value. |
|
staticnodiscardnoexcept |
Returns the specified int32 value as an xtd::array of bytes.
| value | A int32 value. |
|
staticnodiscardnoexcept |
Returns the specified int64 value as an xtd::array of bytes.
| value | A int64 value. |
|
staticnodiscardnoexcept |
Returns the specified single value as an xtd::array of bytes.
| value | A single value. |
|
staticnodiscardnoexcept |
Returns the specified xtd::byte value as an xtd::array of bytes.
| value | A xtd::byte value. |
|
staticnodiscardnoexcept |
Returns the specified uint16 value as an xtd::array of bytes.
| value | A uint16 value. |
|
staticnodiscardnoexcept |
Returns the specified uint32 value as an xtd::array of bytes.
| value | A uint32 value. |
|
staticnodiscardnoexcept |
Returns the specified uint64 value as an xtd::array of bytes.
| value | A uint64 value. |
|
staticnodiscardnoexcept |
Converts the specified 32-bit signed integer to a single-precision floating point number.
| value | The number to convert. |
|
staticnodiscardnoexcept |
Converts the specified 64-bit signed integer to a double-precision floating point number.
| value | The number to convert. |
|
staticnodiscardnoexcept |
Converts the specified single-precision floating point number to a 32-bit signed integer.
| value | The number to convert. |
|
staticnodiscard |
Returns a Boolean value converted from one xtd::byte at a specified position in a xtd::byte xtd::array.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a Boolean value converted from one xtd::byte at a specified position in a xtd::byte xtd::read_only_span.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a char32 converted from two bytes at a specified position in a xtd::byte xtd::array.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a char32 converted from two bytes at a specified position in a xtd::byte xtd::read_only_span.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a double-precision floating point number converted from eight bytes at a specified position in a xtd::byte xtd::array.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a double-precision floating point number converted from eight bytes at a specified position in a xtd::byte xtd::read_only_span.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a 16-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::array.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a 16-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::read_only_span.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a 32-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::array.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a 32-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::read_only_span.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a 64-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::array.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a 64-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::read_only_span.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a single-precision floating point number converted from eight bytes at a specified position in a xtd::byte xtd::array.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a single-precision floating point number converted from eight bytes at a specified position in a xtd::byte xtd::read_only_span.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a 16-bit unsigned integer converted from two bytes at a specified position in a xtd::byte xtd::array.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a 16-bit unsigned integer converted from two bytes at a specified position in a xtd::byte xtd::read_only_span.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a 32-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::array.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a 32-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::read_only_span.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a 64-bit unsigned integer converted from two bytes at a specified position in a xtd::byte xtd::array.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a 64-bit unsigned integer converted from two bytes at a specified position in a xtd::byte xtd::read_only_span.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a xtd::size converted from two bytes at a specified position in a xtd::byte xtd::array.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Returns a sxtd::ize converted from two bytes at a specified position in a xtd::byte xtd::read_only_span.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| argument_exception | start_index equals the length of value minus 1. |
| argument_null_exception | value is null |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Converts the numeric value of each element of a specified xtd::array of bytes to its equivalent hexadecimal xtd::string representation.
| value | An xtd::array of bytes. |
| argument_null_exception | value is null. |
|
staticnodiscard |
Converts the numeric value of each element of a specified xtd::array of bytes to its equivalent hexadecimal xtd::string representation.
| value | An xtd::read_only_span of bytes. |
| argument_null_exception | value is null. |
|
staticnodiscard |
Converts the numeric value of each element of a specified sub xtd::array of bytes to its equivalent hexadecimal xtd::string representation.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| argument_null_exception | value is null. |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Converts the numeric value of each element of a specified sub xtd::array of bytes to its equivalent hexadecimal xtd::string representation.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| argument_null_exception | value is null. |
| argument_out_of_range_exception | start_index is less than zero or greater than the length of value minus 1. |
|
staticnodiscard |
Converts the numeric value of each element of a specified sub xtd::array of bytes to its equivalent hexadecimal xtd::string representation.
| value | An xtd::array of bytes. |
| start_index | The starting position within value. |
| length | The number of xtd::array elements in value to convert. |
| argument_null_exception | value is null. |
| argument_out_of_range_exception | start_index or length is less than zero. -or- start_index is greater than zero and is greater than or equal to the length of value. |
| argument_exception | The combination of start_index and length does not specify a position within value; that is, the start_index parameter is greater than the length of value minus the length parameter. |
|
staticnodiscard |
Converts the numeric value of each element of a specified sub xtd::array of bytes to its equivalent hexadecimal xtd::string representation.
| value | An xtd::read_only_span of bytes. |
| start_index | The starting position within value. |
| length | The number of xtd::array elements in value to convert. |
| argument_null_exception | value is null. |
| argument_out_of_range_exception | start_index or length is less than zero. -or- start_index is greater than zero and is greater than or equal to the length of value. |
| argument_exception | The combination of start_index and length does not specify a position within value; that is, the start_index parameter is greater than the length of value minus the length parameter. |
|
staticconstexpr |
Indicates the xtd::byte order ("endianness") in which data is stored in this computer architecture.
|
staticconstexpr |
Indicates the xtd::byte order ("endianness") in which data is stored in this computer architecture.
|
staticconstexpr |
Indicates the xtd::byte order ("endianness") in which data is stored in this computer architecture.