diff options
author | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-14 00:42:39 +0000 |
---|---|---|
committer | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-14 00:42:39 +0000 |
commit | 7746aca763ca441dc956c81443239040ffe54c2a (patch) | |
tree | 5b14921e439ef80f41bfff8b650d21363914bd82 /base/string_util.h | |
parent | 0078ffb91ddeea8c35cdd75ffe161623030d8dbf (diff) | |
download | chromium_src-7746aca763ca441dc956c81443239040ffe54c2a.zip chromium_src-7746aca763ca441dc956c81443239040ffe54c2a.tar.gz chromium_src-7746aca763ca441dc956c81443239040ffe54c2a.tar.bz2 |
Undo 16020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16021 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.h')
-rw-r--r-- | base/string_util.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/base/string_util.h b/base/string_util.h index 5a51b2d..c32bef3 100644 --- a/base/string_util.h +++ b/base/string_util.h @@ -553,17 +553,30 @@ std::string JoinString(const std::vector<std::string>& parts, char s); void SplitStringAlongWhitespace(const std::wstring& str, std::vector<std::wstring>* 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. +// Replace $1-$2-$3 in the format string with |a| and |b| respectively. +// Additionally, $$ is replaced by $. The offset/offsets parameter here can be +// NULL. string16 ReplaceStringPlaceholders(const string16& format_string, - const std::vector<const string16>& subst, + const string16& a, + size_t* offset); + +string16 ReplaceStringPlaceholders(const string16& format_string, + const string16& a, + const string16& b, std::vector<size_t>* offsets); -// Single-string shortcut for ReplaceStringHolders. string16 ReplaceStringPlaceholders(const string16& format_string, const string16& a, - size_t* offset); + const string16& b, + const string16& c, + std::vector<size_t>* offsets); + +string16 ReplaceStringPlaceholders(const string16& format_string, + const string16& a, + const string16& b, + const string16& c, + const string16& d, + std::vector<size_t>* offsets); // If the size of |input| is more than |max_len|, this function returns true and // |input| is shortened into |output| by removing chars in the middle (they are |