asHexWithOrder

Create string representation of some value in hexadecimal view with specified byte order.

template asHexWithOrder(BYTE_ORDER byteOrder)
asHexWithOrder
(
T
)
()
if (
isBasicType!T
)

Members

Functions

asHexWithOrder
auto asHexWithOrder(T value)
Undocumented in source. Be warned that the author may not have intended to support it.

Parameters

byteOrder

Order of bytes.

value

Some value of basic D's type.

Return Value

String representation (hexadecimal digits) of value.

Typical usage:

import std.stdio : writeln;

auto value = 0xabcdef01;
value.asHexWithOrder!(BYTE_ORDER.BIG_ENDIAN).writeln;    // prints "abcdef01"
value.asHexWithOrder!(BYTE_ORDER.LITTLE_ENDIAN).writeln; // prints "01efcdab"

Meta