splitting binaries on a separator

mats cronqvist masse@REDACTED
Fri May 29 09:52:25 CEST 2009


Per Melin <per.melin@REDACTED> writes:

> Joel Reymont:
>>
>> On May 28, 2009, at 5:09 PM, Robert Virding wrote:
>>
>>> Couldn't you just first step down the binary until you find the index of
>>> the
>>> separator and then do a split_binary/2 on the original?
>>
>> I'm dense today. How would you step down the binary to find the index of the
>> separator?
>
> This is faster than your code for the situations I tested, but still
> much slower than the regexp module:

  please don't use, or even mention, the regexp module. it makes my
  brain hurt. re is what you want.


More information about the erlang-questions mailing list