Last night, at some unpleasant hour, we celebrated our fifth instance of bug tracking due to the behavior of String.split , for example. in
output split '\n' map processRow
The problem is that if output empty, split will give you one line, an empty line that processRow probably won't like.
It is easy enough to increment String using the split0 method (we have), which returns an empty array if the string is empty, but we continue to forget that split has such a behavior that it is not a valid inverse mkString . Soooo, five bites of this dog is enough - we would like to hide split and force ourselves to choose between split0 and split1 . Is this possible in Scala?
source share