diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-14 20:31:49 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-14 20:31:49 +0000 |
commit | 866ba3fc1097334050b59b919e12e11314f2965d (patch) | |
tree | c05394b43a97cd8e34bbefafaf7ad34f03a4e943 /base/string_util.h | |
parent | b7e2b7a2262be4ee720e8c11551fb5a08c8111ee (diff) | |
download | chromium_src-866ba3fc1097334050b59b919e12e11314f2965d.zip chromium_src-866ba3fc1097334050b59b919e12e11314f2965d.tar.gz chromium_src-866ba3fc1097334050b59b919e12e11314f2965d.tar.bz2 |
Re-attempt r28993
Add string16 support for TrimString, TrimWhitespace, and CollapseWhitespace.
Also adds kWhitespaceUTF16.
R=brettw
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/275019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29012 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); |