Function toNative [src]
Converts an integer from specified endianness to host endianness.
Prototype
pub fn toNative(comptime T: type, x: T, endianness_of_x: Endian) T Parameters
T: typex: Tendianness_of_x: Endian Source
pub fn toNative(comptime T: type, x: T, endianness_of_x: Endian) T {
return switch (endianness_of_x) {
.little => littleToNative(T, x),
.big => bigToNative(T, x),
};
}