Binary to ASCII

Chandrashekhar Mullaparthi <>
Fri Dec 20 14:05:24 CET 2002


12> List = "abcd".
"abcd"
13>
13>
13>
13> Bin = list_to_binary(List).
<<97,98,99,100>>
14>
14> binary_to_list(Bin).
"abcd"
15>

-----Original Message-----
From: Inswitch Solutions - Erlang Evaluation [mailto:]
Sent: 21 December 2002 08:49
To: 
Subject: Binary to ASCII 



I'd like to convert a set of bytes to ASCII characters (string).
Please, could someone tell me how to do this in Erlang ?


Thanks,
Eduardo Figoli
INSwitch Solutions



NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.




More information about the erlang-questions mailing list