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

Function trim

src/common/str_map.cc:65–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65static std::string_view trim(std::string_view str)
66{
67 static const char* whitespaces = "\t\n ";
68 auto beg = str.find_first_not_of(whitespaces);
69 if (beg == str.npos) {
70 return {};
71 }
72 auto end = str.find_last_not_of(whitespaces);
73 return str.substr(beg, end - beg + 1);
74}
75
76int get_str_map(
77 const string &str,

Callers 15

collect_sys_infoFunction · 0.70
get_str_mapFunction · 0.70
rbd_features_from_stringFunction · 0.50
site_name_setMethod · 0.50
StringToMapFunction · 0.50
_readxMethod · 0.50
writexMethod · 0.50
log_trim_upkeepMethod · 0.50
shutdown_passMethod · 0.50
upkeep_mainMethod · 0.50
executeMethod · 0.50

Calls 1

substrMethod · 0.80

Tested by

no test coverage detected