Hex encoding functions on the binary module
Fri Jan 29 20:00:25 CET 2021
I propose to add the encode_hex/1, encode_hex/2 and decode_hex/1
functions on the binary module.
Dealing with the hex format is frequent in many codebases. At this time,
we all copy-paste similar helpers in our codebases to encode and decode
a hex-encoded binary.
It's why I suggest enriching the binary module with these functions.
I've added these functions on the binary module because it makes sense
to me, and it avoids polluting the global namespace with a new
module. Maybe create a new module called hex, for example, is a better
I tried as much as possible to follow the contribution guide. Don't
hesitate to tell me if I made a mistake somewhere.
More information about the erlang-questions