Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2304)

Unified Diff: base/string_util.cc

Issue 304003: Add more string16 variants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/string_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_util.cc
===================================================================
--- base/string_util.cc (revision 29400)
+++ base/string_util.cc (working copy)
@@ -1301,6 +1301,14 @@
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 @@
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 @@
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 @@
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);
« no previous file with comments | « base/string_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698