#include <stdint.h>
#include "base/i18n/string_search.h"
#include "base/check.h"
#include "base/check_op.h"
#include "third_party/icu/source/i18n/unicode/usearch.h"
namespace base {
namespace i18n {
FixedPatternStringSearch::FixedPatternStringSearch(
const std::u16string& find_this,
bool case_sensitive)
: … { … }
FixedPatternStringSearch::~FixedPatternStringSearch() { … }
bool FixedPatternStringSearch::Search(const std::u16string& in_this,
size_t* match_index,
size_t* match_length,
bool forward_search) { … }
FixedPatternStringSearchIgnoringCaseAndAccents::
FixedPatternStringSearchIgnoringCaseAndAccents(
const std::u16string& find_this)
: … { … }
bool FixedPatternStringSearchIgnoringCaseAndAccents::Search(
const std::u16string& in_this,
size_t* match_index,
size_t* match_length) { … }
bool StringSearchIgnoringCaseAndAccents(const std::u16string& find_this,
const std::u16string& in_this,
size_t* match_index,
size_t* match_length) { … }
bool StringSearch(const std::u16string& find_this,
const std::u16string& in_this,
size_t* match_index,
size_t* match_length,
bool case_sensitive,
bool forward_search) { … }
RepeatingStringSearch::RepeatingStringSearch(const std::u16string& find_this,
const std::u16string& in_this,
bool case_sensitive)
: … { … }
RepeatingStringSearch::~RepeatingStringSearch() { … }
bool RepeatingStringSearch::NextMatchResult(int& match_index,
int& match_length) { … }
}
}