diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-05 15:34:00 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-05 15:34:00 +0000 |
commit | 0bea7254836d17e3f1e278cbd52e8b8816c49a48 (patch) | |
tree | eb16c01ad0143fad583cd60a87828fd90c94f61a /base/string_number_conversions.h | |
parent | 93f3edc8adc1db9e3d1deebde0ec58d15b7e1a91 (diff) | |
download | chromium_src-0bea7254836d17e3f1e278cbd52e8b8816c49a48.zip chromium_src-0bea7254836d17e3f1e278cbd52e8b8816c49a48.tar.gz chromium_src-0bea7254836d17e3f1e278cbd52e8b8816c49a48.tar.bz2 |
Rename BASE_API to BASE_EXPORT.
R=rvargas
Review URL: http://codereview.chromium.org/7461141
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95618 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_number_conversions.h')
-rw-r--r-- | base/string_number_conversions.h | 89 |
1 files changed, 46 insertions, 43 deletions
diff --git a/base/string_number_conversions.h b/base/string_number_conversions.h index a4b6e3e..6cf6a76 100644 --- a/base/string_number_conversions.h +++ b/base/string_number_conversions.h @@ -8,7 +8,7 @@ #include <string> #include <vector> -#include "base/base_api.h" +#include "base/base_export.h" #include "base/basictypes.h" #include "base/string16.h" @@ -28,21 +28,21 @@ namespace base { // Number -> string conversions ------------------------------------------------ -BASE_API std::string IntToString(int value); -BASE_API string16 IntToString16(int value); +BASE_EXPORT std::string IntToString(int value); +BASE_EXPORT string16 IntToString16(int value); -BASE_API std::string UintToString(unsigned value); -BASE_API string16 UintToString16(unsigned value); +BASE_EXPORT std::string UintToString(unsigned value); +BASE_EXPORT string16 UintToString16(unsigned value); -BASE_API std::string Int64ToString(int64 value); -BASE_API string16 Int64ToString16(int64 value); +BASE_EXPORT std::string Int64ToString(int64 value); +BASE_EXPORT string16 Int64ToString16(int64 value); -BASE_API std::string Uint64ToString(uint64 value); -BASE_API string16 Uint64ToString16(uint64 value); +BASE_EXPORT std::string Uint64ToString(uint64 value); +BASE_EXPORT string16 Uint64ToString16(uint64 value); // DoubleToString converts the double to a string format that ignores the // locale. If you want to use locale specific formatting, use ICU. -BASE_API std::string DoubleToString(double value); +BASE_EXPORT std::string DoubleToString(double value); // String -> number conversions ------------------------------------------------ @@ -58,30 +58,32 @@ BASE_API std::string DoubleToString(double value); // - No characters parseable as a number at the beginning of the string. // |*output| will be set to 0. // - Empty string. |*output| will be set to 0. -BASE_API bool StringToInt(const std::string& input, int* output); -BASE_API bool StringToInt(std::string::const_iterator begin, - std::string::const_iterator end, - int* output); -BASE_API bool StringToInt(const char* begin, const char* end, int* output); - -BASE_API bool StringToInt(const string16& input, int* output); -BASE_API bool StringToInt(string16::const_iterator begin, - string16::const_iterator end, - int* output); -BASE_API bool StringToInt(const char16* begin, const char16* end, int* output); - -BASE_API bool StringToInt64(const std::string& input, int64* output); -BASE_API bool StringToInt64(std::string::const_iterator begin, - std::string::const_iterator end, - int64* output); -BASE_API bool StringToInt64(const char* begin, const char* end, int64* output); - -BASE_API bool StringToInt64(const string16& input, int64* output); -BASE_API bool StringToInt64(string16::const_iterator begin, - string16::const_iterator end, - int64* output); -BASE_API bool StringToInt64(const char16* begin, const char16* end, - int64* output); +BASE_EXPORT bool StringToInt(const std::string& input, int* output); +BASE_EXPORT bool StringToInt(std::string::const_iterator begin, + std::string::const_iterator end, + int* output); +BASE_EXPORT bool StringToInt(const char* begin, const char* end, int* output); + +BASE_EXPORT bool StringToInt(const string16& input, int* output); +BASE_EXPORT bool StringToInt(string16::const_iterator begin, + string16::const_iterator end, + int* output); +BASE_EXPORT bool StringToInt(const char16* begin, const char16* end, + int* output); + +BASE_EXPORT bool StringToInt64(const std::string& input, int64* output); +BASE_EXPORT bool StringToInt64(std::string::const_iterator begin, + std::string::const_iterator end, + int64* output); +BASE_EXPORT bool StringToInt64(const char* begin, const char* end, + int64* output); + +BASE_EXPORT bool StringToInt64(const string16& input, int64* output); +BASE_EXPORT bool StringToInt64(string16::const_iterator begin, + string16::const_iterator end, + int64* output); +BASE_EXPORT bool StringToInt64(const char16* begin, const char16* end, + int64* output); // For floating-point conversions, only conversions of input strings in decimal // form are defined to work. Behavior with strings representing floating-point @@ -89,7 +91,7 @@ BASE_API bool StringToInt64(const char16* begin, const char16* end, // NaN and inf) is undefined. Otherwise, these behave the same as the integral // variants. This expects the input string to NOT be specific to the locale. // If your input is locale specific, use ICU to read the number. -BASE_API bool StringToDouble(const std::string& input, double* output); +BASE_EXPORT bool StringToDouble(const std::string& input, double* output); // Hex encoding ---------------------------------------------------------------- @@ -99,21 +101,22 @@ BASE_API bool StringToDouble(const std::string& input, double* output); // you suspect that the data you want to format might be large, the absolute // max size for |size| should be is // std::numeric_limits<size_t>::max() / 2 -BASE_API std::string HexEncode(const void* bytes, size_t size); +BASE_EXPORT std::string HexEncode(const void* bytes, size_t size); // Best effort conversion, see StringToInt above for restrictions. -BASE_API bool HexStringToInt(const std::string& input, int* output); -BASE_API bool HexStringToInt(std::string::const_iterator begin, - std::string::const_iterator end, - int* output); -BASE_API bool HexStringToInt(const char* begin, const char* end, int* output); +BASE_EXPORT bool HexStringToInt(const std::string& input, int* output); +BASE_EXPORT bool HexStringToInt(std::string::const_iterator begin, + std::string::const_iterator end, + int* output); +BASE_EXPORT bool HexStringToInt(const char* begin, const char* end, + int* output); // Similar to the previous functions, except that output is a vector of bytes. // |*output| will contain as many bytes as were successfully parsed prior to the // error. There is no overflow, but input.size() must be evenly divisible by 2. // Leading 0x or +/- are not allowed. -BASE_API bool HexStringToBytes(const std::string& input, - std::vector<uint8>* output); +BASE_EXPORT bool HexStringToBytes(const std::string& input, + std::vector<uint8>* output); } // namespace base |