-
-
Couldn't load subscription status.
- Fork 1.7k
Open
Description
String#each_line splits a string by line separator (LF or CRLF) and yields each individual line. Sometimes only populated lines are interesting, so you want to remove all empty ones. This can be accomplished by manual filtering. But that adds extra complexity to the call site. I think it would be useful to have a parameter remove_empty : Bool similar to String#split. #each_line is essentially a special case variant of #split.
devnote-dev and Sija