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

Unified Diff: base/string_util.h

Issue 10828217: string_util support for joining strings using strings not just chars. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: string_util support for joining strings on strings in addition to chars. Created 8 years, 4 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 | « no previous file | base/string_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_util.h
diff --git a/base/string_util.h b/base/string_util.h
index 428550baef573ec67f14ffffa9d8fc30537e958b..367eaa8e1bd4257ecbb7d03282cb370ea7d252e4 100644
--- a/base/string_util.h
+++ b/base/string_util.h
@@ -508,6 +508,14 @@ BASE_EXPORT string16 JoinString(const std::vector<string16>& parts, 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 string16 JoinString(
+ const std::vector<string16>& parts,
+ const 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
// number less one. Eg $$->$, $$$->$$, etc. The offsets parameter here can be
« no previous file with comments | « no previous file | base/string_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698