Closed 22ispencer closed 2 days ago
upon further investigation it does work when i use string.contains(input, "\r\n"), which seems counter intuitive, could anyone explain why?
\r\n
is a single grapheme. The JavaScript version however has a bug in which it does not correctly handle the unicode here and splits it in half: https://github.com/gleam-lang/stdlib/issues/584
I am learning gleam, and to do this i am doing the advent of code 2023, however because i'm on windows line endings are CRLF by default, when i try to parse my string i created a function to split a string by lines and i tried to use string.contains(input, "\r") however this is returning false even though the io.debug print of the string contains "\r\n".