Login
From:
openmymind.net
(Uncensored)
subscribe
Comparing Strings as Integers with @bitCast
https://www.openmymind.net/Comparing-Strings-as-Integers-with-bitCast/
links
backlinks
Roast topics
Find topics
Find it!
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: