<div dir="ltr"><div style>Or more efficiently:</div>iolist_to_binary(["abc", "def"]).</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 14, 2013 at 10:47 AM, John Kemp <span dir="ltr"><<a href="mailto:john@jkemp.net" target="_blank">john@jkemp.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">list_to_binary(lists:flatten(["abc","def"])).<br>
<br>
?<br>
<br>
JohnK<br>
<div class="HOEnZb"><div class="h5"><br>
On Mar 14, 2013, at 1:42 PM, wenew zhang wrote:<br>
<br>
> on erl command shell,<br>
> A=list_to_binary("abc").<br>
> B=list_to_binary("def").<br>
> i want A+B convert to <<"abcdef">><br>
> now i need do it as below:<br>
> list_to_binary(binary_to_list(A)++binary_to_list(B)).<br>
><br>
> <<"abcdef">><br>
><br>
> is there a simple method make A+B in binary type?<br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>