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

Method abs

lib/mathlib.cpp:1248–1253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1246
1247
1248std::string MathLib::abs(const std::string &tok)
1249{
1250 if (isNegative(tok))
1251 return tok.substr(1, tok.length() - 1);
1252 return tok;
1253}
1254
1255bool MathLib::isEqual(const std::string &first, const std::string &second)
1256{

Callers

nothing calls this directly

Calls 1

isNegativeFunction · 0.85

Tested by

no test coverage detected