Comparing Strings as Integers with @bitCast

In the last blog posts, we looked at different ways to compare strings in Zig . A few posts back, we introduced Zig's @bitCast . As a quick recap, @bitCast lets us force a specific type onto a value. For example, the following prints 1067282596: const std = @import("std"); pub fn main() !void { const f: f32 = 1.23; const n: u32 = @bitCast(f); std.debug.print("{d} n", .{n}); } What's happening here…