#include "util/stdlib/string_number_conversion.h"
#include <errno.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <limits>
#include "base/strings/string_util.h"
namespace {
template <typename TIntType, typename TLongType>
struct StringToIntegerTraits { … };
template <typename TIntType, typename TLongType>
struct StringToSignedIntegerTraits
: public StringToIntegerTraits<TIntType, TLongType> { … };
template <typename TIntType, typename TLongType>
struct StringToUnsignedIntegerTraits
: public StringToIntegerTraits<TIntType, TLongType> { … };
struct StringToIntTraits : public StringToSignedIntegerTraits<int, long> { … };
struct StringToUnsignedIntTraits
: public StringToUnsignedIntegerTraits<unsigned int, unsigned long> { … };
struct StringToLongTraits
: public StringToSignedIntegerTraits<long, long long> { … };
struct StringToUnsignedLongTraits
: public StringToUnsignedIntegerTraits<unsigned long, unsigned long long> { … };
struct StringToLongLongTraits
: public StringToSignedIntegerTraits<long long, long long> { … };
struct StringToUnsignedLongLongTraits
: public StringToUnsignedIntegerTraits<unsigned long long,
unsigned long long> { … };
template <typename Traits>
bool StringToIntegerInternal(const std::string& string,
typename Traits::IntType* number) { … }
}
namespace crashpad {
bool StringToNumber(const std::string& string, int* number) { … }
bool StringToNumber(const std::string& string, unsigned int* number) { … }
bool StringToNumber(const std::string& string, long* number) { … }
bool StringToNumber(const std::string& string, unsigned long* number) { … }
bool StringToNumber(const std::string& string, long long* number) { … }
bool StringToNumber(const std::string& string, unsigned long long* number) { … }
}