How to extract a binary from a string?

2

I have the following decimal list in Erlang: "01000001" == [48, 49, 49, 49, 49, 49, 48]

I need to create a binary type from this list, so: < <<01000001>> == <<"A">>

I have tried to convert with the list_to_binary/1 function, but it becomes: <<"01000001">> == <<48, 49, 49, 49, 49, 49, 48>>

Is there a function that does this? Or how would be the best way to transform "01000001" in <<01000001>> ?

    
asked by anonymous 16.10.2018 / 18:24

0 answers