[erlang-questions] does erlang binary append need to convert to list first?

James Aimonetti james@REDACTED
Thu Mar 14 18:46:48 CET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

<<A/binary, B/binary>> should suffice.


On 03/14/2013 10:42 AM, wenew zhang wrote:
> on erl command shell, A=list_to_binary("abc"). 
> B=list_to_binary("def"). i want A+B convert to <<"abcdef">> now i
> need do it as below: 
> list_to_binary(binary_to_list(A)++binary_to_list(B)).
> 
> <<"abcdef">>
> 
> is there a simple method make A+B in binary type?
> 
> 
> 
> _______________________________________________ erlang-questions
> mailing list erlang-questions@REDACTED 
> http://erlang.org/mailman/listinfo/erlang-questions
> 


- -- 
James Aimonetti
Distributed Systems Engineer / DJ MC_

2600hz | http://2600hz.com
sip:james@REDACTED
tel: 415.886.7905
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRQg0IAAoJENc77s1OYoGg1uYIAKN/abHWXyGlWzDJ0xWo6pVT
XR8hT5Pk9rgR3wPILmiKTfpfzwzA5REkGKMI263zYDeSW4SLYKzawksMI4orrakR
V+aq8xfjFVzKs1hVDCVZtb6LPNecMLrw3e4OsvJTDzE/AgAnyf8yPaPuvTeJ8v7n
d8oLXsHyjfdS40pEDFpxLRqAnZT5Oi/GoIlaoiD7Ales7+cKODv25JIvV7rmngHY
1YHOFj86hximkoHdzRc7x/XzHMLk8yyWjo0mFefukPQUbrS/P2NQIustvO+gmVMx
hkTruTk6N0jmO73vC4FolLRfMd693elvqUHUuiBilv15qKsUiDGI55NAFe11XA8=
=Y/Sx
-----END PGP SIGNATURE-----



More information about the erlang-questions mailing list