MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / ParsePrechecks

Function ParsePrechecks

src/utilstrencodings.cpp:265–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265static bool ParsePrechecks(const std::string& str)
266{
267 if (str.empty()) // No empty string allowed
268 return false;
269 if (str.size() >= 1 && (isspace(str[0]) || isspace(str[str.size()-1]))) // No padding allowed
270 return false;
271 if (str.size() != strlen(str.c_str())) // No embedded NUL characters allowed
272 return false;
273 return true;
274}
275
276bool ParseInt32(const std::string& str, int32_t *out)
277{

Callers 5

ParseInt32Function · 0.70
ParseInt64Function · 0.70
ParseUInt32Function · 0.70
ParseUInt64Function · 0.70
ParseDoubleFunction · 0.70

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected