| Paste number 69677: | split_binary_on |
| Pasted by: | mmagin |
| When: | 1 year, 9 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+1HRH |
| Channel: | None |
| Paste contents: |
split_binary_on(B, Match) ->
split_binary_on(B, Match, <<>>).
split_binary_on(<<Char, Rest/binary>>, Match, Accum) ->
case Char of
Match ->
{Accum, Rest};
_otherwise ->
split_binary_on(Rest, Match, list_to_binary([Accum, Char]))
end.
This paste has no annotations.