xref: /openbmc/phosphor-objmgr/src/path.hpp (revision 78b0486412e0e296fac119be2e4c20fc040d3e7a)
1 #include <string>
2 
appendPathSegment(const std::string & target,const std::string & segment)3 inline std::string appendPathSegment(const std::string& target,
4                                      const std::string& segment)
5 {
6     std::string newPath;
7     newPath.reserve(target.size() + 1 + segment.size());
8     newPath.append(target).append("/").append(segment);
9     return newPath;
10 }
11