MCPcopy Create free account
hub / github.com/ceph/ceph / get_str_map

Function get_str_map

src/common/str_map.cc:76–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76int get_str_map(
77 const string &str,
78 str_map_t* str_map,
79 const char *delims)
80{
81 for_each_pair(str, delims, [str_map](std::string_view key,
82 std::string_view val) {
83 // is the format 'K=V' or just 'K'?
84 if (val.empty()) {
85 str_map->emplace(std::string(key), "");
86 } else {
87 str_map->emplace(std::string(trim(key)), std::string(trim(val)));
88 }
89 });
90 return 0;
91}
92
93str_map_t get_str_map(
94 const string& str,

Callers 7

from_descMethod · 0.85
get_actual_key_from_confFunction · 0.85
TESTFunction · 0.85
get_json_str_mapFunction · 0.85
get_conf_str_map_helperFunction · 0.85
get_value_via_strmapFunction · 0.85
set_metadataMethod · 0.85

Calls 4

for_each_pairFunction · 0.85
trimFunction · 0.70
emptyMethod · 0.45
emplaceMethod · 0.45

Tested by 1

TESTFunction · 0.68