3 ms·
For the record, std::string::starts_with and ends_with are in C++20. Split and join aren't, though. (I think join is not too tough to write, but I don't really
by thestoicattack 7y ago
For the record, std::string::starts_with and ends_with are in C++20. Split and join aren't, though.
(I think join is not too tough to write, but I don't really know how you'd write split in a generic enough way for everyone to be satisfied.)
- ryanianian 7y agoJoin is relatively trivial using std::stringstream. I'm optimistic that split will be less contentious with C++20 ranges since you can just range-based-for loop over the split tokens in-place and/or collect them into a container using range mechanisms : best of both worlds.