text icon indicating copy to clipboard operation
text copied to clipboard

lines is not equivalent to (splitOn "\n")

Open sjakobi opened this issue 4 years ago • 1 comments

λ> Data.Text.lines "\n"
[""]
λ> Data.Text.splitOn "\n" "\n"
["",""]

This surprised me a bit. I think it should be documented at least.

sjakobi avatar Nov 15 '19 14:11 sjakobi

The behaviour of Data.Text.lines is matching Data.List.lines. It would be nice to mention this in documentation indeed.

Bodigrim avatar May 18 '22 20:05 Bodigrim