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

Function ParsePrechecks

src/commons/util/util.cpp:1030–1039  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1028
1029
1030static bool ParsePrechecks(const std::string& str)
1031{
1032 if (str.empty()) // No empty string allowed
1033 return false;
1034 if (str.size() >= 1 && (IsSpace(str[0]) || IsSpace(str[str.size()-1]))) // No padding allowed
1035 return false;
1036 if (str.size() != strlen(str.c_str())) // No embedded NUL characters allowed
1037 return false;
1038 return true;
1039}
1040
1041bool ParseInt32(const std::string& str, int32_t *out)
1042{

Callers 1

ParseInt32Function · 0.85

Calls 3

IsSpaceFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected