3 ms·
std::string::substr does return a copy, but a more idiomatic way to handle sub-strings is to use iterator pairs which of course don't require a copy.
by gpderetta 11y ago
std::string::substr does return a copy, but a more idiomatic way to handle sub-strings is to use iterator pairs which of course don't require a copy.