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

Function optional_string

tests/vibevoice/vibevoice_warm_bench.cpp:71–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71std::string optional_string(const engine::io::json::Value & object, const std::string & key) {
72 const auto * value = object.find(key);
73 return value == nullptr || value->is_null() ? std::string{} : value->as_string();
74}
75
76std::string required_string(const engine::io::json::Value & object, const std::string & key) {
77 auto value = optional_string(object, key);

Callers 3

required_stringFunction · 0.70
make_requestFunction · 0.70
make_task_requestFunction · 0.70

Calls 2

is_nullMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected