Try looking at the source. If I remember correctly, binary:split uses binary:part inside. If this is the case, then you can update the documentation as well to reflect the fact.
Jesper Louis Andersen
Erlang Solutions Ltd., Copenhagen
On Aug 13, 2012, at 7:52 PM, Zabrane Mickael <zabra...@gmail.com> wrote:
do_split(H,[],N,true) when N >= byte_size(H) ->
[];
do_split(H,[],N,_) ->
[binary:part(H,{N,byte_size(H)-N})]; <---- HERE
do_split(H,[{A,B}|T],N,Trim) -> case binary:part(H,{N,A-N}) of <---- HERE
...
So yes, binary:split uses binary:part for sure.
Can OTP guys confirm this fact now?
Regards,
Zabrane
On Aug 14, 2012, at 11:54 AM, Jesper Louis Andersen wrote:
> Try looking at the source. If I remember correctly, binary:split uses binary:part inside. If this is the case, then you can update the documentation as well to reflect the fact.
> Jesper Louis Andersen
> Erlang Solutions Ltd., Copenhagen
> On Aug 13, 2012, at 7:52 PM, Zabrane Mickael <zabra...@gmail.com> wrote: