MCPcopy Create free account
hub / github.com/bytedance/terarkdb / ParseBoolean

Function ParseBoolean

util/string_util.cc:275–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273#ifndef ROCKSDB_LITE
274
275bool ParseBoolean(const std::string& type, const std::string& value) {
276 if (value == "true" || value == "1") {
277 return true;
278 } else if (value == "false" || value == "0") {
279 return false;
280 }
281 throw std::invalid_argument(type);
282}
283
284uint32_t ParseUint32(const std::string& value) {
285 uint64_t num = ParseUint64(value);

Callers 4

ParseOptionHelperFunction · 0.85
ParseCompressionOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected