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

Unified Diff: base/string_number_conversions.h

Issue 9288012: Add StringToUint and StringToUint64 methods to base/string_number_conversions.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 | « no previous file | base/string_number_conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_number_conversions.h
diff --git a/base/string_number_conversions.h b/base/string_number_conversions.h
index 8dc79420bad90feb22917c2d736d770cf99be44a..b002faa341ab57f6ba36b4e59c6c18310a26cd37 100644
--- a/base/string_number_conversions.h
+++ b/base/string_number_conversions.h
@@ -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.
@@ -61,9 +61,16 @@ BASE_EXPORT std::string DoubleToString(double value);
// - Empty string. |*output| will be set to 0.
BASE_EXPORT bool StringToInt(const StringPiece& input, int* output);
BASE_EXPORT bool StringToInt(const StringPiece16& input, int* output);
+
+BASE_EXPORT bool StringToUint(const StringPiece& input, unsigned* output);
+BASE_EXPORT bool StringToUint(const StringPiece16& input, unsigned* output);
+
BASE_EXPORT bool StringToInt64(const StringPiece& input, int64* output);
BASE_EXPORT bool StringToInt64(const StringPiece16& input, int64* output);
+BASE_EXPORT bool StringToUint64(const StringPiece& input, uint64* output);
+BASE_EXPORT bool StringToUint64(const StringPiece16& input, uint64* output);
+
// For floating-point conversions, only conversions of input strings in decimal
// form are defined to work. Behavior with strings representing floating-point
// numbers in hexadecimal, and strings representing non-fininte values (such as
« no previous file with comments | « no previous file | base/string_number_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698