MCPcopy Create free account
hub / github.com/baidu/tera / StringToNumber

Function StringToNumber

src/common/base/string_number.h:62–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60/// ---------------------------------------------------------------
61template <typename Type>
62bool StringToNumber(const std::string& str, Type* value, int base) {
63 // STATIC_ASSERT(TypeTraits::IsInteger<Type>::Value, "Type must be
64 // integral type");
65 char* endptr;
66 bool ret = ParseNumber(str.c_str(), value, &endptr, base);
67 return (ret && *endptr == '\0');
68}
69
70template <typename Type>
71bool StringToNumber(const char* str, Type* value, int base) {

Callers 15

PutInt64OpFunction · 0.50
PutCounterOpFunction · 0.50
AddOpFunction · 0.50
AddInt64OpFunction · 0.50
BatchPutInt64OpFunction · 0.50
CompactTabletOpFunction · 0.50
SetCfPropertiesFunction · 0.50
SetLgPropertiesFunction · 0.50
SetTablePropertiesFunction · 0.50
TESTFunction · 0.50
SetUpMethod · 0.50
TEST_FFunction · 0.50

Calls 1

ParseNumberFunction · 0.70

Tested by 3

TESTFunction · 0.40
SetUpMethod · 0.40
TEST_FFunction · 0.40