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 standard library.
std › debug › MachOFile › OFile › SymbolAdapter › eql Public Function eql Doc Source Public Function std.debug.MachOFile.OFile.SymbolAdapter.eql
pub fn eql (ctx : SymbolAdapter , a_sym_name : []const u8 , b_sym_index : u32 , b_index : usize ) bool Params ctx : SymbolAdapter a_sym_name : []const u8 b_sym_index : u32 b_index : usize File debug/MachOFile.zig: 296
296
297
298
299
300
301
302 pub fn eql (ctx : SymbolAdapter , a_sym_name : []const u8 , b_sym_index : u32 , b_index : usize ) bool {
_ = b_index ;
var b_sym = ctx .symtab_raw [b_sym_index ];
if (builtin .cpu .arch .endian () != .little ) std .mem .byteSwapAllFields (macho .nlist_64 , &b_sym );
const b_sym_name = std .mem .sliceTo (ctx .strtab [b_sym .n_strx ..], 0 );
return mem .eql (u8 , a_sym_name , b_sym_name );
}