[erlang-questions] Efficiency of splitting binaries

Richard Andrews bbmaj7@REDACTED
Thu Oct 25 09:00:29 CEST 2007


--- Håkan Stenholm <hokan.stenholm@REDACTED> wrote:

> > What other way is there to determine the length of a binary?
> >   
> size/1 (works on binaries and tuples), while length/1 works on lists e.g.:
> 
>  > size(<<>>).
> 0
>  > size(<<"abcde">>).
> 5
>  > size({}).
> 0
>  > size({1,2,3}).
> 3


Thanks.

I don't remember seeing this mentioned in any of the OTP docs.



      Sick of deleting your inbox? Yahoo!7 Mail has free unlimited storage.
http://au.docs.yahoo.com/mail/unlimitedstorage.html




More information about the erlang-questions mailing list