MCPcopy Create free account
hub / github.com/argotorg/solidity / removeNlohmannInternalErrorIdentifier

Function removeNlohmannInternalErrorIdentifier

libsolutil/JSON.cpp:113–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113std::string removeNlohmannInternalErrorIdentifier(std::string const& _input)
114{
115 std::string result = _input;
116 std::size_t startPos = result.find('[');
117 std::size_t endPos = result.find(']', startPos);
118
119 if (startPos != std::string::npos && endPos != std::string::npos)
120 result.erase(startPos, endPos - startPos + 1);
121
122 return boost::trim_copy(result);
123}
124
125std::string jsonPrettyPrint(Json const& _input) { return jsonPrint(_input, JsonFormat{JsonFormat::Pretty}); }
126

Callers 1

jsonParseStrictFunction · 0.85

Calls 2

eraseMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected