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

Unified Diff: base/string_util.h

Issue 3266013: Add unit test for ReplaceStringPlaceholders (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Created 10 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_unittest.cc » ('j') | base/string_util_unittest.cc » ('J')
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 ae8b93c22b77338211e7a66b006bf31a9775d420..ca028e16787e9dc0631824e0c175b8b76cfeea1c 100644
--- a/base/string_util.h
+++ b/base/string_util.h
@@ -579,8 +579,9 @@ void SplitStringAlongWhitespace(const std::string& str,
std::vector<std::string>* result);
// Replace $1-$2-$3..$9 in the format string with |a|-|b|-|c|..|i| respectively.
-// Additionally, $$ is replaced by $. The offsets parameter here can
-// be NULL. This only allows you to use up to nine replacements.
+// Additionally, any number of consecutive '$' characters is replaced by that
+// number less one. Eg $$->$, $$$->$$, etc. The offsets parameter here can be
+// NULL. This only allows you to use up to nine replacements.
string16 ReplaceStringPlaceholders(const string16& format_string,
const std::vector<string16>& subst,
std::vector<size_t>* offsets);
« no previous file with comments | « no previous file | base/string_util_unittest.cc » ('j') | base/string_util_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698