[erlang-questions] Smart way to trim a binary?

Christian chsu79@REDACTED
Wed Jun 24 12:34:04 CEST 2009

I prefer this approach for implementing is_whitespace. Saves a few
lines and is quite readable. If I'm lucky the compiler is sufficiently
smart to optimize it into submission.

is_whitespace(C) -> lists:member(C, "\s\t\r\n").

More information about the erlang-questions mailing list