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/strings/string16.h" |
14 #include "base/strings/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 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // Similar to the previous functions, except that output is a vector of bytes. | 113 // Similar to the previous functions, except that output is a vector of bytes. |
114 // |*output| will contain as many bytes as were successfully parsed prior to the | 114 // |*output| will contain as many bytes as were successfully parsed prior to the |
115 // error. There is no overflow, but input.size() must be evenly divisible by 2. | 115 // error. There is no overflow, but input.size() must be evenly divisible by 2. |
116 // Leading 0x or +/- are not allowed. | 116 // Leading 0x or +/- are not allowed. |
117 BASE_EXPORT bool HexStringToBytes(const std::string& input, | 117 BASE_EXPORT bool HexStringToBytes(const std::string& input, |
118 std::vector<uint8>* output); | 118 std::vector<uint8>* output); |
119 | 119 |
120 } // namespace base | 120 } // namespace base |
121 | 121 |
122 #endif // BASE_STRINGS_STRING_NUMBER_CONVERSIONS_H_ | 122 #endif // BASE_STRINGS_STRING_NUMBER_CONVERSIONS_H_ |
OLD | NEW |