summaryrefslogtreecommitdiff
path: root/docs/markdown/snippets/add_str_splitlines_method.md
AgeCommit message (Collapse)Author
2023-07-17Whoopsie, forgot to create the release notes.Jussi Pakkanen
2023-06-20add str.splitlines methodMartin Dørum
The new splitlines method on str is intended to replace usage of fs.read('whatever').strip().split('\n'). The problem with the .strip().split() approach is that it doesn't have a way to represent empty lists (an empty string becomes a list with one empty string, not an empty list), and it doesn't handle Windows-style line endings.