MCPcopy Create free account
hub / github.com/RunanywhereAI/RCLI / config_get_int

Function config_get_int

src/api/rcli_api.cpp:173–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173static int config_get_int(const std::string& json, const std::string& key, int default_val) {
174 auto pos = json.find("\"" + key + "\"");
175 if (pos == std::string::npos) return default_val;
176 auto colon = json.find(':', pos);
177 if (colon == std::string::npos) return default_val;
178 size_t start = colon + 1;
179 while (start < json.size() && (json[start] == ' ' || json[start] == '\t')) start++;
180 if (start >= json.size()) return default_val;
181 return std::atoi(json.c_str() + start);
182}
183
184RCLIHandle rcli_create(const char* config_json) {
185 auto* engine = new (std::nothrow) RCLIEngine();

Callers 1

rcli_createFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected