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

Unified Diff: base/string_util.cc

Issue 31014: Port DictionaryValue to use string16 instead of wstring. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « base/string_util.h ('k') | base/values.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_util.cc
===================================================================
--- base/string_util.cc (revision 10828)
+++ base/string_util.cc (working copy)
@@ -1039,6 +1039,10 @@
return IntToStringT<std::string, int, unsigned int, true>::
IntToString(value);
}
+string16 IntToString16(int value) {
+ return IntToStringT<string16, int, unsigned int, true>::
+ IntToString(value);
+}
std::wstring IntToWString(int value) {
return IntToStringT<std::wstring, int, unsigned int, true>::
IntToString(value);
@@ -1047,6 +1051,10 @@
return IntToStringT<std::string, unsigned int, unsigned int, false>::
IntToString(value);
}
+string16 UintToString16(unsigned int value) {
+ return IntToStringT<string16, unsigned int, unsigned int, false>::
+ IntToString(value);
+}
std::wstring UintToWString(unsigned int value) {
return IntToStringT<std::wstring, unsigned int, unsigned int, false>::
IntToString(value);
@@ -1055,6 +1063,10 @@
return IntToStringT<std::string, int64, uint64, true>::
IntToString(value);
}
+string16 Int64ToString16(int64 value) {
+ return IntToStringT<string16, int64, uint64, true>::
+ IntToString(value);
+}
std::wstring Int64ToWString(int64 value) {
return IntToStringT<std::wstring, int64, uint64, true>::
IntToString(value);
@@ -1063,6 +1075,10 @@
return IntToStringT<std::string, uint64, uint64, false>::
IntToString(value);
}
+string16 Uint64ToString16(uint64 value) {
+ return IntToStringT<string16, uint64, uint64, false>::
+ IntToString(value);
+}
std::wstring Uint64ToWString(uint64 value) {
return IntToStringT<std::wstring, uint64, uint64, false>::
IntToString(value);
@@ -1075,6 +1091,10 @@
return std::string(buffer);
}
+string16 DoubleToString16(double value) {
+ return ASCIIToUTF16(DoubleToString(value));
+}
+
std::wstring DoubleToWString(double value) {
return ASCIIToWide(DoubleToString(value));
}
« no previous file with comments | « base/string_util.h ('k') | base/values.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698