Daniel Lemire personal blog

How quickly can you remove spaces from a string?

Sometimes programmers want to prune out characters from a string of characters. For example, maybe you want to remove all line-ending characters from a piece of text. Let me consider the problem where I want to remove all spaces (' ') and linefeed characters ('\n' and '\r'). How would you do it efficiently? size_t…
Points
201
HN comments
108
Submissions
1
Cited by
0 commenters

Systems & PerformanceSoftware Engineering2017

On Hacker News

SubmittedTitle on HNPointsComments
Jan 20, 2017How quickly can you remove spaces from a string? by deafcalculus201108

More from Daniel Lemire

All 87 posts →

Related posts from the same era