MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / optional_string

Function optional_string

tests/seed_vc/seed_vc_warm_bench.cpp:60–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60std::string optional_string(const engine::io::json::Value & object, const std::string & key) {
61 const auto * value = object.find(key);
62 return value == nullptr || value->is_null() ? std::string{} : value->as_string();
63}
64
65std::string required_string(const engine::io::json::Value & object, const std::string & key) {
66 const auto out = optional_string(object, key);

Callers 3

required_stringFunction · 0.70
mainFunction · 0.70
make_requestFunction · 0.50

Calls 2

is_nullMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected