Index: base/string_number_conversions.cc |
diff --git a/base/string_number_conversions.cc b/base/string_number_conversions.cc |
index 1d82c5d638403df1145353122279dbca2be7180c..41319b35fd66dbaad3d709416a0c22b3f45b5beb 100644 |
--- a/base/string_number_conversions.cc |
+++ b/base/string_number_conversions.cc |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -402,6 +402,14 @@ bool StringToInt(const StringPiece16& input, int* output) { |
return String16ToIntImpl(input, output); |
} |
+bool StringToUint(const StringPiece& input, unsigned* output) { |
+ return StringToIntImpl(input, output); |
+} |
+ |
+bool StringToUint(const StringPiece16& input, unsigned* output) { |
+ return String16ToIntImpl(input, output); |
+} |
+ |
bool StringToInt64(const StringPiece& input, int64* output) { |
return StringToIntImpl(input, output); |
} |
@@ -410,6 +418,14 @@ bool StringToInt64(const StringPiece16& input, int64* output) { |
return String16ToIntImpl(input, output); |
} |
+bool StringToUint64(const StringPiece& input, uint64* output) { |
+ return StringToIntImpl(input, output); |
+} |
+ |
+bool StringToUint64(const StringPiece16& input, uint64* output) { |
+ return String16ToIntImpl(input, output); |
+} |
+ |
bool StringToDouble(const std::string& input, double* output) { |
errno = 0; // Thread-safe? It is on at least Mac, Linux, and Windows. |
char* endptr = NULL; |