summaryrefslogtreecommitdiffstats
path: root/base/string_util.h
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-14 00:21:58 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-14 00:21:58 +0000
commit0078ffb91ddeea8c35cdd75ffe161623030d8dbf (patch)
tree96089176d6afd0030fa4eb77a8b6ca7bcbb4ec59 /base/string_util.h
parent849a62a1aa77e5d7887bc310233d86cf33ebf393 (diff)
downloadchromium_src-0078ffb91ddeea8c35cdd75ffe161623030d8dbf.zip
chromium_src-0078ffb91ddeea8c35cdd75ffe161623030d8dbf.tar.gz
chromium_src-0078ffb91ddeea8c35cdd75ffe161623030d8dbf.tar.bz2
Allow the new tab page to be themed (you may want to review DOMUIThemeSource as a whole and not just these changes).
Change global std::strings to chars* in browser theme provider. Add ability for ReplaceStringPlaceHolder to take up to 9 replacements. BUG=11235,11685 Review URL: http://codereview.chromium.org/115172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.h')
-rw-r--r--base/string_util.h25
1 files changed, 6 insertions, 19 deletions
diff --git a/base/string_util.h b/base/string_util.h
index c32bef3..5a51b2d 100644
--- a/base/string_util.h
+++ b/base/string_util.h
@@ -553,30 +553,17 @@ 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 in the format string with |a| and |b| respectively.
-// Additionally, $$ is replaced by $. The offset/offsets parameter here can be
-// NULL.
+// 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.
string16 ReplaceStringPlaceholders(const string16& format_string,
- const string16& a,
- size_t* offset);
-
-string16 ReplaceStringPlaceholders(const string16& format_string,
- const string16& a,
- const string16& b,
+ const std::vector<const string16>& subst,
std::vector<size_t>* offsets);
+// Single-string shortcut for ReplaceStringHolders.
string16 ReplaceStringPlaceholders(const string16& format_string,
const string16& a,
- 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);
+ size_t* offset);
// 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