Is there a function like find_last_of in std but not in string?
问题 I know there is function string::find_last_of But I want to process a large chunk of char* data. I don't want to assign the char* to a string. I know there is a std function std::find But it only can find char* on positive sequence. Is there such a way to find in reverse order? If not in std, is there a way in boost? 回答1: std::find_end() Searches for the last subsequence of elements [s_first, s_last) in the range [first, last). For example #include <algorithm> char *data = ...; char *data_end