Convert utf8 to binary

In particular:

julia> sum(count_ones.(xor.(codeunits(str1), codeunits(str2))))
37

(I used codeunits rather than Vector{UInt8} to avoid making a copy — codeunits is just a byte-based view of the string contents.)

3 Likes