diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-14 19:09:12 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-14 19:09:12 +0000 |
commit | 40fc3d21e1bbe3d30ef741213739a9529f23b690 (patch) | |
tree | ab1913d108e6eaecf19bfa7fea5c767ac90cf36b /base/string_util.h | |
parent | 6828b596c4aa6fa0376125c6a8f97dbfeafe23f3 (diff) | |
download | chromium_src-40fc3d21e1bbe3d30ef741213739a9529f23b690.zip chromium_src-40fc3d21e1bbe3d30ef741213739a9529f23b690.tar.gz chromium_src-40fc3d21e1bbe3d30ef741213739a9529f23b690.tar.bz2 |
Add string16 support for TrimString, TrimWhitespace, and CollapseWhitespace.
Also adds kWhitespaceUTF16.
R=brettw
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/267098
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28993 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.h')
-rw-r--r-- | base/string_util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/base/string_util.h b/base/string_util.h index 333f5f6..5f7afea 100644 --- a/base/string_util.h +++ b/base/string_util.h @@ -120,6 +120,7 @@ const std::wstring& EmptyWString(); const string16& EmptyString16(); extern const wchar_t kWhitespaceWide[]; +extern const char16 kWhitespaceUTF16[]; extern const char kWhitespaceASCII[]; // Removes characters in trim_chars from the beginning and end of input. @@ -127,6 +128,9 @@ extern const char kWhitespaceASCII[]; bool TrimString(const std::wstring& input, const wchar_t trim_chars[], std::wstring* output); +bool TrimString(const string16& input, + const char16 trim_chars[], + string16* output); bool TrimString(const std::string& input, const char trim_chars[], std::string* output); @@ -147,6 +151,9 @@ enum TrimPositions { TrimPositions TrimWhitespace(const std::wstring& input, TrimPositions positions, std::wstring* output); +TrimPositions TrimWhitespace(const string16& input, + TrimPositions positions, + string16* output); TrimPositions TrimWhitespaceASCII(const std::string& input, TrimPositions positions, std::string* output); |