123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- #ifndef BASE_I18N_STRING_SEARCH_H_
- #define BASE_I18N_STRING_SEARCH_H_
- #include <stddef.h>
- #include "base/i18n/base_i18n_export.h"
- #include "base/strings/string16.h"
- struct UStringSearch;
- namespace base {
- namespace i18n {
- BASE_I18N_EXPORT
- bool StringSearchIgnoringCaseAndAccents(const string16& find_this,
- const string16& in_this,
- size_t* match_index,
- size_t* match_length);
- BASE_I18N_EXPORT
- bool StringSearch(const string16& find_this,
- const string16& in_this,
- size_t* match_index,
- size_t* match_length,
- bool case_sensitive,
- bool forward_search);
- class BASE_I18N_EXPORT FixedPatternStringSearch {
- public:
- explicit FixedPatternStringSearch(const string16& find_this,
- bool case_sensitive);
- ~FixedPatternStringSearch();
-
-
-
- bool Search(const string16& in_this,
- size_t* match_index,
- size_t* match_length,
- bool forward_search);
- private:
- string16 find_this_;
- UStringSearch* search_;
- };
- class BASE_I18N_EXPORT FixedPatternStringSearchIgnoringCaseAndAccents {
- public:
- explicit FixedPatternStringSearchIgnoringCaseAndAccents(
- const string16& find_this);
-
-
-
- bool Search(const string16& in_this,
- size_t* match_index,
- size_t* match_length);
- private:
- FixedPatternStringSearch base_search_;
- };
- }
- }
- #endif
|