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

Pablo Platt <>
Tue Jun 28 11:58:46 CEST 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110628/6aad09f0/attachment.html>


More information about the erlang-questions mailing list