diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-10 08:18:46 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-10 08:18:46 +0000 |
commit | 4493574d71becba0ad1cbb74ce600466cc4f33e0 (patch) | |
tree | f50e1a49a49043de9e134087cb98f3b337fdf3b1 /base/string_util.h | |
parent | a15cbd47814d62163e2d66e64e7cb9e144fa5ca1 (diff) | |
download | chromium_src-4493574d71becba0ad1cbb74ce600466cc4f33e0.zip chromium_src-4493574d71becba0ad1cbb74ce600466cc4f33e0.tar.gz chromium_src-4493574d71becba0ad1cbb74ce600466cc4f33e0.tar.bz2 |
Make the glob matcher support UTF8 strings.
This generalizes the existing pattern matching code to support UTF8 strings.
BUG=53158
TEST=string_util_unittests.cc
Review URL: http://codereview.chromium.org/3295018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59071 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.h')
-rw-r--r-- | base/string_util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/string_util.h b/base/string_util.h index 7788562..8370f8a 100644 --- a/base/string_util.h +++ b/base/string_util.h @@ -599,8 +599,8 @@ bool ElideString(const std::wstring& input, int max_len, std::wstring* output); // string can contain wildcards like * and ? // The backslash character (\) is an escape character for * and ? // We limit the patterns to having a max of 16 * or ? characters. -bool MatchPatternWide(const std::wstring& string, const std::wstring& pattern); -bool MatchPatternASCII(const std::string& string, const std::string& pattern); +bool MatchPattern(const std::string& string, const std::string& pattern); +bool MatchPattern(const string16& string, const string16& pattern); // Hack to convert any char-like type to its unsigned counterpart. // For example, it will convert char, signed char and unsigned char to unsigned |