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.pull/11864/head
parent
8c766f5b5b
commit
e869a09bc2
4 changed files with 44 additions and 0 deletions
@ -0,0 +1,3 @@ |
||||
## Added str.splitlines method |
||||
|
||||
[[str.splitlines]] can now be used to split a string into an array of lines. |
Loading…
Reference in new issue