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
| Submitted | Title on HN | Points | Comments |
|---|---|---|---|
| Jan 20, 2017 | How quickly can you remove spaces from a string? by deafcalculus | 201 | 108 |