evanmiller/erlydtl — pull request #71 by gar1t (2013-04-29 15:52:45+00:00)
Title: Support for empty values in yesno filter

The previous implementation was over specified and didn't support empty
strings as yesno options.

This implementation uses binary:split/3, which is as efficient as
string:tokens/2 but returns empty tokens.

See https://github.com/gar1t/erlang-bench/blob/master/comma-parse.escript for
details on parsing implementations.

This commit removes the odd conversion of Bool to a list, which was never
used in yesno_io.

This change returns a *binary* value, which may be contrary to the spirit
of the template implementation. If this is the case, the the result can be
easily converted to a list (a seeming waste of cycles, but perhaps there's
a good reason for it).