MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / stringToULL

Function stringToULL

externals/simplecpp/simplecpp.cpp:134–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134static unsigned long long stringToULL(const std::string &s)
135{
136 unsigned long long ret;
137 const bool hex = isHex(s);
138 const bool oct = isOct(s);
139 std::istringstream istr(hex ? s.substr(2) : oct ? s.substr(1) : s);
140 if (hex)
141 istr >> std::hex;
142 else if (oct)
143 istr >> std::oct;
144 istr >> ret;
145 return ret;
146}
147
148static bool endsWith(const std::string &s, const std::string &e)
149{

Callers 1

simplifyNumbersFunction · 0.85

Calls 2

isHexFunction · 0.85
isOctFunction · 0.85

Tested by

no test coverage detected