2 ms·
You could also do the inversion yourself: dst += (src[i] != ' ' && src[i] != '\r' && src[i] != '\n'); (This also misses some other whitespace, like '\t', '\
by caf 8y ago
You could also do the inversion yourself:
dst += (src[i] != ' ' && src[i] != '\r' && src[i] != '\n');
(This also misses some other whitespace, like '\t', '\f' and '\v', which if you included might change the balance between the vector and scalar versions).