MCPcopy Create free account
hub / github.com/SOUI2/soui / removeSuffix

Function removeSuffix

third-part/jsoncpp/src/jsontestrunner/main.cpp:211–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211static JSONCPP_STRING removeSuffix(const JSONCPP_STRING& path,
212 const JSONCPP_STRING& extension) {
213 if (extension.length() >= path.length())
214 return JSONCPP_STRING("");
215 JSONCPP_STRING suffix = path.substr(path.length() - extension.length());
216 if (suffix != extension)
217 return JSONCPP_STRING("");
218 return path.substr(0, path.length() - extension.length());
219}
220
221static void printConfig() {
222// Print the configuration used to compile JsonCpp

Callers 1

runTestFunction · 0.85

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected