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

Unified Diff: base/strings/string_util.h

Issue 1237873004: Revert of Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/debug/crash_logging.cc ('k') | base/strings/string_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_util.h
diff --git a/base/strings/string_util.h b/base/strings/string_util.h
index b75a9f88b848a5ce2cad42dbabe70cc8b35ee9fe..e4abce2147eb84c1668e1edb7f23f1986a2bfe35 100644
--- a/base/strings/string_util.h
+++ b/base/strings/string_util.h
@@ -491,12 +491,6 @@
BASE_EXPORT wchar_t* WriteInto(std::wstring* str, size_t length_with_null);
#endif
-// Does the opposite of SplitString().
-BASE_EXPORT std::string JoinString(const std::vector<std::string>& parts,
- StringPiece separator);
-BASE_EXPORT string16 JoinString(const std::vector<string16>& parts,
- StringPiece16 separator);
-
} // namespace base
#if defined(OS_WIN)
@@ -506,6 +500,22 @@
#else
#error Define string operations appropriately for your platform
#endif
+
+//-----------------------------------------------------------------------------
+
+// Does the opposite of SplitString().
+BASE_EXPORT base::string16 JoinString(const std::vector<base::string16>& parts,
+ base::char16 s);
+BASE_EXPORT std::string JoinString(
+ const std::vector<std::string>& parts, char s);
+
+// Join |parts| using |separator|.
+BASE_EXPORT std::string JoinString(
+ const std::vector<std::string>& parts,
+ const std::string& separator);
+BASE_EXPORT base::string16 JoinString(
+ const std::vector<base::string16>& parts,
+ const base::string16& separator);
// Replace $1-$2-$3..$9 in the format string with |a|-|b|-|c|..|i| respectively.
// Additionally, any number of consecutive '$' characters is replaced by that
« no previous file with comments | « base/debug/crash_logging.cc ('k') | base/strings/string_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698