Is it possible to set some another find() algorithm in std::string, just like we can set self-written Allocator. Or it's possible only through inheritance?
Asked
Active
Viewed 147 times
0
-
1What do you want to achieve? – juanchopanza Jun 09 '13 at 16:54
-
2Check out [std::find_if](http://www.cplusplus.com/reference/algorithm/find_if/) – Garee Jun 09 '13 at 16:54
-
How about defining a non-member function? Do you have to access the private members? – cxyzs7 Jun 09 '13 at 17:55
-
Look around in [char_traits](http://en.cppreference.com/w/cpp/string/char_traits) to see what you can change, it has some find method. Like custom allocator you can provide your own traits. – Balog Pal Jun 09 '13 at 16:57
-
Thanks for your answers! @juanchopanza, I wanna test different search algorithms. – Ivan Kush Jun 17 '13 at 19:35