pub fn toNative(comptime T: type, x: T, endianness_of_x: Endian) T T: typex: Tendianness_of_x: Endian4265
4266
4267
4268
4269
4270pub 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),
};
}
Converts an integer from specified endianness to host endianness.