Is it possible/(relatively) easy/std™ to start comparing at the back of a string or should I write my own function for that? It would be relatively straightforward of course, but still, I would trust a standard library implementation over mine any day.
The end of the string is almost unique, and the front is quite common, that’s the only reason I need this “optimization”.
Thanks!
Best I can think of so far is
str1.size() == str2.size() && std::equal(str1.rbegin(), str1.rend(), str2.rbegin())