MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / extractLongInteger

Function extractLongInteger

src/util.cpp:261–264  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Perform strtol on a string and check if the extracted value matches.

Source from the content-addressed store, hash-verified

259// Perform strtol on a string and check if the extracted value matches.
260//
261bool extractLongInteger(const std::string& input, long& output) {
262 output = strtol(input.c_str(), nullptr, 10);
263 return (format("{1}", output) == input);
264}

Callers 1

modifyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected