DEV Community

Discussion on: Let's talk about how powerful split function is

Collapse
 
tracker1 profile image
Michael J. Ryan

Would suggest that splitLines would use \r?\n as a lot of files on windows will still have crlf line endings.

Collapse
 
jalal246 profile image
Jalal 🚀

Yes Michael, I totally agree. That's why, originally in gihub repo, I created a getNewLineChar function, to detect new line character for different systems.