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