strip_containing_names.cc
Go to the documentation of this file.
2 
3 // If 'find_{first,last}_of' returns std::string::npos, then 'pos' will
4 // be 0 and the call to substr will return the full key.
5 
8 {
9  auto const pos = key.find_first_of(".") + 1;
10  return key.substr(pos);
11 }
12 
15 {
16  auto const pos = key.find_last_of(".") + 1;
17  return key.substr(pos);
18 }
std::string string
Definition: nybbler.cc:12
std::string strip_first_containing_name(std::string const &key)
def key(type, name=None)
Definition: graph.py:13
std::string strip_all_containing_names(std::string const &key)