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

John Kemp john@REDACTED
Thu Mar 14 18:47:01 CET 2013


list_to_binary(lists:flatten(["abc","def"])). 

?

JohnK

On Mar 14, 2013, at 1:42 PM, 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




More information about the erlang-questions mailing list