[erlang-questions] bug in binary:split with trim?

Ahmed Omar spawn.think@REDACTED
Tue Jun 28 12:43:42 CEST 2011


According to documentation it's not
*trim**Removes trailing empty parts of the result (as does trim in
re:split/3)**
*
http://www.erlang.org/doc/man/binary.html#split-2

On Tue, Jun 28, 2011 at 11:58 AM, Pablo Platt <pablo.platt@REDACTED> wrote:

> binary:split with the trim option doesn't remove empty results from the
> beginning of the binary:
>
> binary:split(<<"/a/b/">>, <<"/">>, [global, trim]).
> [<<>>,<<"a">>,<<"b">>]
>
> binary:split(<<"//a/b///">>, <<"/">>, [trim, global]).
> [<<>>,<<>>,<<"a">>,<<"b">>]
>
> Is this a bug?
>
> Thanks
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>


-- 
Best Regards,
- Ahmed Omar
http://nl.linkedin.com/in/adiaa
Follow me on twitter
@spawn_think <http://twitter.com/#!/spawn_think>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110628/8390745e/attachment.htm>


More information about the erlang-questions mailing list