MCPcopy Create free account
hub / github.com/Tencent/phxsql / GetInteger

Method GetInteger

phxcomm/configparser/inih-master/cpp/INIReader.cpp:47–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47long INIReader::GetInteger(const string &section, const string &name, const long &default_value) {
48 string valstr = Get(section, name, "");
49 const char* value = valstr.c_str();
50 char* end;
51 // This parses "1234" (decimal) and also "0x4D2" (hex)
52 long n = strtol(value, &end, 0);
53 return end > value ? n : default_value;
54}
55
56int INIReader::ValueHandler(void* user, const char* section, const char* name, const char* value) {
57 INIReader* reader = (INIReader*) user;

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by 1

mainFunction · 0.36