Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
fhiclcpp
fhiclcpp
types
detail
strip_containing_names.cc
Go to the documentation of this file.
1
#include "
fhiclcpp/types/detail/strip_containing_names.h
"
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
6
std::string
7
fhicl::detail::strip_first_containing_name
(
std::string
const
&
key
)
8
{
9
auto
const
pos
= key.find_first_of(
"."
) + 1;
10
return
key.substr(
pos
);
11
}
12
13
std::string
14
fhicl::detail::strip_all_containing_names
(
std::string
const
&
key
)
15
{
16
auto
const
pos
= key.find_last_of(
"."
) + 1;
17
return
key.substr(
pos
);
18
}
string
std::string string
Definition:
nybbler.cc:12
strip_containing_names.h
fhicl::detail::strip_first_containing_name
std::string strip_first_containing_name(std::string const &key)
Definition:
strip_containing_names.cc:7
wirecell.dfp.graph.key
def key(type, name=None)
Definition:
graph.py:13
MakeVectorFile.pos
tuple pos
Definition:
MakeVectorFile.py:68
fhicl::detail::strip_all_containing_names
std::string strip_all_containing_names(std::string const &key)
Definition:
strip_containing_names.cc:14
Generated by
1.8.11