The problem with string classes, including std::string, is that they are object oriented. The things you do with a string should be orthogonal to how the string works. When you think about it std::string is really a string buffer. And if we had good string algorithms, it wouldn't be much more useful than vector<char>.
In various circumstances you may want: string_views, copy_on_write_buffers, small_buffers (for small-string optimization), native arrays of chars, std::arrays of chars, std::vectors of chars, tries, and so on.
In all of the above cases, you should be able to write:
auto firstSpace = std::find(
begin(myCharContainer),
end(myCharContainer),
' ');
...to get an iterator to the first space in your container.
And on top of all that, you could make versions of begin() and end() that return iterators that respect various character encodings.
In various circumstances you may want: string_views, copy_on_write_buffers, small_buffers (for small-string optimization), native arrays of chars, std::arrays of chars, std::vectors of chars, tries, and so on.
In all of the above cases, you should be able to write: auto firstSpace = std::find( begin(myCharContainer), end(myCharContainer), ' '); ...to get an iterator to the first space in your container.
And on top of all that, you could make versions of begin() and end() that return iterators that respect various character encodings.