MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / IsTrueText

Function IsTrueText

Source/Utils/cxxopts.hpp:596–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594 }
595
596 inline bool IsTrueText(const std::string &text)
597 {
598 const char *pdata = text.c_str();
599 if (*pdata == 't' || *pdata == 'T')
600 {
601 pdata += 1;
602 if (strncmp(pdata, "rue\0", 4) == 0)
603 {
604 return true;
605 }
606 }
607 else if (strncmp(pdata, "1\0", 2) == 0)
608 {
609 return true;
610 }
611 return false;
612 }
613
614 inline bool IsFalseText(const std::string &text)
615 {

Callers 1

parse_valueFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected