Refactoring find functions of basic_string_t.