MCPcopy Create free account
hub / github.com/ashvardanian/less_slow.cpp / config_parse_stl

Function config_parse_stl

less_slow.cpp:4370–4378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4368}
4369
4370void config_parse_stl(std::string_view config_text, std::vector<std::pair<std::string, std::string>> &settings) {
4371 split(config_text, is_newline, [&settings](std::string_view line) {
4372 line = strip_spaces(line);
4373 if (line.empty() || line.front() == '#') return; // Skip empty lines or comments
4374 auto [key, value] = split_key_value(line);
4375 if (key.empty() || value.empty()) return; // Skip invalid lines
4376 settings.emplace_back(key, value);
4377 });
4378}
4379
4380void parse_stl(bm::State &state, std::string_view config_text) {
4381 std::size_t pairs = 0, bytes = 0;

Callers 1

parse_stlFunction · 0.85

Calls 2

splitFunction · 0.85
split_key_valueFunction · 0.85

Tested by

no test coverage detected