Followup from Advent of Code 2022 feedback:
It would be useful to have a function which splits a string into lines, properly taking into account:
\n (unix), \r\n (windows), and \r (mac classic and perhaps others), though carriage-only endings seem to be rare, and on unix it is used in TUIs to mean "erase current line."The signature could be:
lines : Str -> List Str
The elements in the returned list would not contain line endings.
Love it! I'd be happy to accept a PR for this :smiley:
Last updated: Jun 16 2026 at 16:19 UTC