Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

byteSwapAllFields

Swap the byte order of all the members of the fields of a struct (Changing their endianness)

mem.byteSwapAllFields
pub fn byteSwapAllFields(comptime S: type, ptr: *S) void

File

lib/std/mem.zig:2220

Code

pub fn byteSwapAllFields(comptime S: type, ptr: *S) void {
    byteSwapAllFieldsAligned(S, .of(S), ptr);
}