19 ms·
You can have the line break appended at the end by using the three-arg version of mkString: (header :: rows).mkString("", "\n", "\n") My two cents: I pref
by rbonvall 7y ago
You can have the line break appended at the end by using the three-arg version of mkString:
(header :: rows).mkString("", "\n", "\n")
My two cents: I prefer the second solution. Maybe it's because I have never programmed in Java.
- zaphirplane 7y agoI love how when a person posts a good snippet someone will always chime in with an improvement