elm/core

String.lines "" returns [""]

smucode opened this issue ยท 3 comments

Hello ๐Ÿ‘‹ . The docs for String.lines say:

Break a string into lines, splitting on newlines.
lines "How are you?\nGood?" == ["How are you?", "Good?"]

Which causes me to be very confused about this behavior:

> String.lines ""
[""] : List String

Just a bug, or is there some rationale behind this?

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

Finally, please be patient with the core team. They are trying their best with limited resources.

Thinking of it, it kinda makes sense ๐Ÿ˜…

That should be added as an example in the docs