MCPcopy Create free account
hub / github.com/apple/foundationdb / get_value_multi

Function get_value_multi

fdbmonitor/fdbmonitor.cpp:199–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199const char* get_value_multi(const CSimpleIni& ini, const char* key, ...) {
200 const char* ret = nullptr;
201 const char* section = nullptr;
202
203 std::string keyWithUnderscores(key);
204 for (int i = keyWithUnderscores.size() - 1; i >= 0; --i) {
205 if (keyWithUnderscores[i] == '-') {
206 keyWithUnderscores.at(i) = '_';
207 }
208 }
209
210 va_list ap;
211 va_start(ap, key);
212 while (!ret && (section = va_arg(ap, const char*))) {
213 ret = ini.GetValue(section, key, nullptr);
214 if (!ret) {
215 ret = ini.GetValue(section, keyWithUnderscores.c_str(), nullptr);
216 }
217 }
218 va_end(ap);
219 return ret;
220}
221
222bool isParameterNameEqual(const char* str, const char* target) {
223 if (!str || !target) {

Callers 1

CommandMethod · 0.85

Calls 4

atMethod · 0.80
GetValueMethod · 0.80
sizeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected