Refactoring functions about rfind and compare.
Refactoring basic_string_find_first_of.