diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-19 19:36:53 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-19 19:36:53 +0000 |
commit | 20b2431f1cb5f5db841a5d130b03c9660c8a8d1c (patch) | |
tree | a5e80e50088f11f7d53ebdb39ddaaf7f1ed4c926 /base/string_util.cc | |
parent | 8e902a58f2d8cfe594ece7fa3dafdd21cd75add0 (diff) | |
download | chromium_src-20b2431f1cb5f5db841a5d130b03c9660c8a8d1c.zip chromium_src-20b2431f1cb5f5db841a5d130b03c9660c8a8d1c.tar.gz chromium_src-20b2431f1cb5f5db841a5d130b03c9660c8a8d1c.tar.bz2 |
Add more string16 variants.
R=brettw
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/304003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.cc')
-rw-r--r-- | base/string_util.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/base/string_util.cc b/base/string_util.cc index 5d15299..b0ab3a6 100644 --- a/base/string_util.cc +++ b/base/string_util.cc @@ -1301,6 +1301,14 @@ void SplitString(const std::wstring& str, SplitStringT(str, s, true, r); } +#if !defined(WCHAR_T_IS_UTF16) +void SplitString(const string16& str, + char16 s, + std::vector<string16>* r) { + SplitStringT(str, s, true, r); +} +#endif + void SplitString(const std::string& str, char s, std::vector<std::string>* r) { @@ -1313,6 +1321,14 @@ void SplitStringDontTrim(const std::wstring& str, SplitStringT(str, s, false, r); } +#if !defined(WCHAR_T_IS_UTF16) +void SplitStringDontTrim(const string16& str, + char16 s, + std::vector<string16>* r) { + SplitStringT(str, s, false, r); +} +#endif + void SplitStringDontTrim(const std::string& str, char s, std::vector<std::string>* r) { @@ -1340,6 +1356,12 @@ std::string JoinString(const std::vector<std::string>& parts, char sep) { return JoinStringT(parts, sep); } +#if !defined(WCHAR_T_IS_UTF16) +string16 JoinString(const std::vector<string16>& parts, char sep) { + return JoinStringT(parts, sep); +} +#endif + std::wstring JoinString(const std::vector<std::wstring>& parts, wchar_t sep) { return JoinStringT(parts, sep); } @@ -1389,6 +1411,13 @@ void SplitStringAlongWhitespace(const std::wstring& str, SplitStringAlongWhitespaceT(str, result); } +#if !defined(WCHAR_T_IS_UTF16) +void SplitStringAlongWhitespace(const string16& str, + std::vector<string16>* result) { + SplitStringAlongWhitespaceT(str, result); +} +#endif + void SplitStringAlongWhitespace(const std::string& str, std::vector<std::string>* result) { SplitStringAlongWhitespaceT(str, result); |