OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_STRINGS_STRING_NUMBER_CONVERSIONS_H_ | 5 #ifndef BASE_STRINGS_STRING_NUMBER_CONVERSIONS_H_ |
6 #define BASE_STRINGS_STRING_NUMBER_CONVERSIONS_H_ | 6 #define BASE_STRINGS_STRING_NUMBER_CONVERSIONS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/base_export.h" | 11 #include "base/base_export.h" |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/string16.h" | 13 #include "base/string16.h" |
14 #include "base/string_piece.h" | 14 #include "base/strings/string_piece.h" |
15 | 15 |
16 // ---------------------------------------------------------------------------- | 16 // ---------------------------------------------------------------------------- |
17 // IMPORTANT MESSAGE FROM YOUR SPONSOR | 17 // IMPORTANT MESSAGE FROM YOUR SPONSOR |
18 // | 18 // |
19 // This file contains no "wstring" variants. New code should use string16. If | 19 // This file contains no "wstring" variants. New code should use string16. If |
20 // you need to make old code work, use the UTF8 version and convert. Please do | 20 // you need to make old code work, use the UTF8 version and convert. Please do |
21 // not add wstring variants. | 21 // not add wstring variants. |
22 // | 22 // |
23 // Please do not add "convenience" functions for converting strings to integers | 23 // Please do not add "convenience" functions for converting strings to integers |
24 // that return the value and ignore success/failure. That encourages people to | 24 // that return the value and ignore success/failure. That encourages people to |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // |*output| will contain as many bytes as were successfully parsed prior to the | 106 // |*output| will contain as many bytes as were successfully parsed prior to the |
107 // error. There is no overflow, but input.size() must be evenly divisible by 2. | 107 // error. There is no overflow, but input.size() must be evenly divisible by 2. |
108 // Leading 0x or +/- are not allowed. | 108 // Leading 0x or +/- are not allowed. |
109 BASE_EXPORT bool HexStringToBytes(const std::string& input, | 109 BASE_EXPORT bool HexStringToBytes(const std::string& input, |
110 std::vector<uint8>* output); | 110 std::vector<uint8>* output); |
111 | 111 |
112 } // namespace base | 112 } // namespace base |
113 | 113 |
114 #endif // BASE_STRINGS_STRING_NUMBER_CONVERSIONS_H_ | 114 #endif // BASE_STRINGS_STRING_NUMBER_CONVERSIONS_H_ |
115 | 115 |
OLD | NEW |