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

Pablo Platt pablo.platt@REDACTED
Tue Jun 28 14:20:07 CEST 2011

Is there a reason to make it work only for trailing empty parts but not for all empty parts?

From: Ahmed Omar <spawn.think@REDACTED>
To: Pablo Platt <pablo.platt@REDACTED>
Cc: "erlang-questions@REDACTED" <erlang-questions@REDACTED>
Sent: Tuesday, June 28, 2011 1:43 PM
Subject: Re: [erlang-questions] bug in binary:split with trim?

According to documentation it's not
Removes trailingempty parts of the result (as does trim in re:split/3)


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]).
>binary:split(<<"//a/b///">>, <<"/">>, [trim, global]).
>Is this a bug?
>erlang-questions mailing list

Best Regards,
- Ahmed Omar
Follow me on twitter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110628/80935fbb/attachment.htm>

More information about the erlang-questions mailing list