S
Simon Strandgaard
problem:
often I use the %W(a b c d e f) for quickly making an array of strings.
sometimes I need an empty string in that array, and I have to
change the code into %W(a b c) + [''] + %W(d e f).
which doesn't look nice.. and makes me do silly stuff instead.
suggestion:
It would be really nice if it was easier to make empty strings within %W.
for instance slash E could be the empty string
%W(a \E b) #=> ["a", "", "b"]
If no spacing in between.. then output would simply be
%W(a\Eb) #=> ["ab"]
often I use the %W(a b c d e f) for quickly making an array of strings.
sometimes I need an empty string in that array, and I have to
change the code into %W(a b c) + [''] + %W(d e f).
which doesn't look nice.. and makes me do silly stuff instead.
suggestion:
It would be really nice if it was easier to make empty strings within %W.
for instance slash E could be the empty string
%W(a \E b) #=> ["a", "", "b"]
If no spacing in between.. then output would simply be
%W(a\Eb) #=> ["ab"]