54 static constexpr uint32 __endian_value__ = 0x01020304;
55 static constexpr xtd::byte __endian_query__ =
static_cast<const xtd::byte&
>(__endian_value__);
76 static constexpr bool is_big_endian = __endian_query__ == 0x01u;
83 static constexpr bool is_little_endian = __endian_query__ == 0x04u;
90 static constexpr endian endianness = is_little_endian ? endian::little : endian::big;
Contains xtd::array class.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:59
Represents text as a sequence of character units.
Definition basic_string.hpp:71
Converts base data types to an xtd::array of bytes, and an xtd::array of bytes to base data types.
Definition bit_converter.hpp:52
static int32 to_int32(const xtd::array< xtd::byte > &value, xtd::size start_index)
Returns a 32-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::...
static uint64 to_uint64(const read_only_span< xtd::byte > &value, xtd::size start_index)
Returns a 64-bit unsigned integer converted from two bytes at a specified position in a xtd::byte xtd...
static int32 to_int32(const read_only_span< xtd::byte > &value, xtd::size start_index)
Returns a 32-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::...
static uint16 to_uint16(const xtd::array< xtd::byte > &value, xtd::size start_index)
Returns a 16-bit unsigned integer converted from two bytes at a specified position in a xtd::byte xtd...
static float int32_bits_to_single(int32 value) noexcept
Converts the specified 32-bit signed integer to a single-precision floating point number.
static int64 to_int64(const xtd::array< xtd::byte > &value, xtd::size start_index)
Returns a 64-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::...
static xtd::array< xtd::byte > get_bytes(wchar value) noexcept
Returns the specified Char value as an xtd::array of bytes.
static uint64 to_uint64(const xtd::array< xtd::byte > &value, xtd::size start_index)
Returns a 64-bit unsigned integer converted from two bytes at a specified position in a xtd::byte xtd...
static xtd::array< xtd::byte > get_bytes(uint16 value) noexcept
Returns the specified uint16 value as an xtd::array of bytes.
static int64 double_to_int64_bits(double value) noexcept
Converts the specified double-precision floating point number to a 64-bit signed integer.
static xtd::array< xtd::byte > get_bytes(int32 value) noexcept
Returns the specified int32 value as an xtd::array of bytes.
static xtd::string to_string(const read_only_span< xtd::byte > &value, xtd::size start_index)
Converts the numeric value of each element of a specified sub xtd::array of bytes to its equivalent h...
static int16 to_int16(const read_only_span< xtd::byte > &value, xtd::size start_index)
Returns a 16-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::...
static xtd::string to_string(const read_only_span< xtd::byte > &value)
Converts the numeric value of each element of a specified xtd::array of bytes to its equivalent hexad...
static int16 to_int16(const xtd::array< xtd::byte > &value, xtd::size start_index)
Returns a 16-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::...
static uint32 to_uint32(const xtd::array< xtd::byte > &value, xtd::size start_index)
Returns a 32-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::...
static bool to_boolean(const xtd::array< xtd::byte > &value, xtd::size start_index)
Returns a Boolean value converted from one xtd::byte at a specified position in a xtd::byte xtd::arra...
static xtd::string to_string(const xtd::array< xtd::byte > &value)
Converts the numeric value of each element of a specified xtd::array of bytes to its equivalent hexad...
static xtd::array< xtd::byte > get_bytes(float value) noexcept
Returns the specified single value as an xtd::array of bytes.
static xtd::array< xtd::byte > get_bytes(sbyte value) noexcept
Returns the specified xtd::byte value as an xtd::array of bytes.
static double to_double(const read_only_span< xtd::byte > &value, xtd::size start_index)
Returns a double-precision floating point number converted from eight bytes at a specified position i...
static xtd::array< xtd::byte > get_bytes(xtd::byte value) noexcept
Returns the specified xtd::byte value as an xtd::array of bytes.
static xtd::array< xtd::byte > get_bytes(uint64 value) noexcept
Returns the specified uint64 value as an xtd::array of bytes.
static xtd::array< xtd::byte > get_bytes(double value) noexcept
Returns the specified double value as an xtd::array of bytes.
static xtd::array< xtd::byte > get_bytes(char32 value) noexcept
Returns the specified Char value as an xtd::array of bytes.
endian
Represents the xtd::byte order ("endianness") in which data is stored in this computer architecture.
Definition bit_converter.hpp:60
@ little
Represnets "Little-endian" order.
@ big
Represnets "Big-endian" order.
static xtd::array< xtd::byte > get_bytes(int16 value) noexcept
Returns the specified int16 value as an xtd::array of bytes.
static uint16 to_uint16(const read_only_span< xtd::byte > &value, xtd::size start_index)
Returns a 16-bit unsigned integer converted from two bytes at a specified position in a xtd::byte xtd...
static xtd::string to_string(const xtd::array< xtd::byte > &value, xtd::size start_index, xtd::size length)
Converts the numeric value of each element of a specified sub xtd::array of bytes to its equivalent h...
static int32 single_to_int32_bits(float value) noexcept
Converts the specified single-precision floating point number to a 32-bit signed integer.
static char32 to_char(const xtd::array< xtd::byte > &value, xtd::size start_index)
Returns a char32 converted from two bytes at a specified position in a xtd::byte xtd::array.
static xtd::array< xtd::byte > get_bytes(char value) noexcept
Returns the specified Char value as an xtd::array of bytes.
static char32 to_char(const read_only_span< xtd::byte > &value, xtd::size start_index)
Returns a char32 converted from two bytes at a specified position in a xtd::byte xtd::read_only_span.
static float to_single(const xtd::array< xtd::byte > &value, xtd::size start_index)
Returns a single-precision floating point number converted from eight bytes at a specified position i...
static int64 to_int64(const read_only_span< xtd::byte > &value, xtd::size start_index)
Returns a 64-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::...
static xtd::string to_string(const read_only_span< xtd::byte > &value, xtd::size start_index, xtd::size length)
Converts the numeric value of each element of a specified sub xtd::array of bytes to its equivalent h...
static double to_double(const xtd::array< xtd::byte > &value, xtd::size start_index)
Returns a double-precision floating point number converted from eight bytes at a specified position i...
static double int64_bits_to_double(int64 value) noexcept
Converts the specified 64-bit signed integer to a double-precision floating point number.
static uint32 to_uint32(const read_only_span< xtd::byte > &value, xtd::size start_index)
Returns a 32-bit signed integer converted from two bytes at a specified position in a xtd::byte xtd::...
static xtd::string to_string(const xtd::array< xtd::byte > &value, xtd::size start_index)
Converts the numeric value of each element of a specified sub xtd::array of bytes to its equivalent h...
static bool to_boolean(const read_only_span< xtd::byte > &value, xtd::size start_index)
Returns a Boolean value converted from one xtd::byte at a specified position in a xtd::byte xtd::read...
static xtd::array< xtd::byte > get_bytes(int64 value) noexcept
Returns the specified int64 value as an xtd::array of bytes.
static xtd::array< xtd::byte > get_bytes(uint32 value) noexcept
Returns the specified uint32 value as an xtd::array of bytes.
static float to_single(const read_only_span< xtd::byte > &value, xtd::size start_index)
Returns a single-precision floating point number converted from eight bytes at a specified position i...
static xtd::array< xtd::byte > get_bytes(char16 value) noexcept
Returns the specified Char value as an xtd::array of bytes.
static xtd::array< xtd::byte > get_bytes(bool value) noexcept
Returns the specified Boolean value as an xtd::array of bytes.
Represents a non-owning view over a contiguous sequence of objects.
Definition read_only_span.hpp:52
Contains core_export_ keyword.
Contains enum_ and enum_ut_ keywords.
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:37
#define core_export_
Define shared library export.
Definition core_export.hpp:13
int16_t int16
Represents a 16-bit signed integer.
Definition int16.hpp:23
wchar_t wchar
Represents a wide character.
Definition wchar.hpp:24
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
int64_t int64
Represents a 64-bit signed integer.
Definition int64.hpp:23
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition ulong.hpp:27
int8_t sbyte
Represents a 8-bit signed integer.
Definition sbyte.hpp:23
char16_t char16
Represents a 16-bit unicode character.
Definition char16.hpp:26
uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
char32_t char32
Represents a 32-bit unicode character.
Definition char32.hpp:26
uint64_t uint64
Represents a 64-bit unsigned integer.
Definition uint64.hpp:23
uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.hpp:23
uint16_t uint16
Represents a 16-bit unsigned integer.
Definition uint16.hpp:23
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition slong.hpp:27
std::vector< std::pair< enum_t, xtd::string > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition enum_collection.hpp:22
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::read_only_span class.
Contains xtd::static_object class.
Provides the registration struct for enumerations.
Definition enum_register.hpp:38
Contains xtd fundamental types.