MCPcopy Create free account
hub / github.com/Tencent/libpag / StringToBoolean

Function StringToBoolean

exporter/src/utils/StringHelper.cpp:121–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121bool StringToBoolean(const std::string& value, const bool defaultValue) {
122 if (value.empty()) {
123 return defaultValue;
124 }
125 auto lowerValue = ToLowerCase(value);
126 return lowerValue == "true";
127}
128
129float StringToFloat(const std::string& value, const float defaultValue) {
130 if (value.empty()) {

Callers

nothing calls this directly

Calls 2

ToLowerCaseFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected