Hacker News new | ask | show | jobs
by mlindner 2716 days ago
That's not trivial and different languages vary in how they handle new line characters even. https://stackoverflow.com/questions/44995851/how-do-i-check-...
1 comments

You can still split non-ASCII text on ASCII newlines, and quite often that's exactly what needs to be done.
And usually, you don't want it to cost O(n) on top of whatever parser you ran to find those newlines.