diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 19:32:09 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 19:32:09 +0000 |
commit | 5f522afa610b2e6a3f9d02a66aeae8f7f8ce0e7b (patch) | |
tree | 5bb1d180ee0dc1bbc75b4f287e80c74aa970ef9d /base/string_util.h | |
parent | 76bac57bbe748e45b1307ab2bcab009f5645d6b6 (diff) | |
download | chromium_src-5f522afa610b2e6a3f9d02a66aeae8f7f8ce0e7b.zip chromium_src-5f522afa610b2e6a3f9d02a66aeae8f7f8ce0e7b.tar.gz chromium_src-5f522afa610b2e6a3f9d02a66aeae8f7f8ce0e7b.tar.bz2 |
Add unit test for functionality added to ReplaceStringPlaceholders in r57966.
TEST=base_unittests --gtest_filter=StringUtilTest.ReplaceStringPlaceholders*
Review URL: http://codereview.chromium.org/3266013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58047 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.h')
-rw-r--r-- | base/string_util.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/base/string_util.h b/base/string_util.h index ae8b93c..ca028e1 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); |