Can I format an Erlang binary so that each byte is written in hex? I.e.,
> io:format(???, [<<255, 16>>]). <>
Here is another short and fast version which I use:
hexlify(Bin) when is_binary(Bin) -> << <<(hex(H)),(hex(L))>> || <> <= Bin >>. hex(C) when C < 10 -> $0 + C; hex(C) -> $a + C - 10.