MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / joinPaths

Method joinPaths

erpcgen/src/SearchPath.cpp:131–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131std::string PathSearcher::joinPaths(const std::string &first, const std::string &second)
132{
133 // Start with first string.
134 std::string result = first;
135
136 // Add path separator if needed
137 if ((first[first.size() - 1] != PATH_SEP_CHAR) && (second[0] != PATH_SEP_CHAR))
138 {
139 result += PATH_SEP_STRING;
140 }
141
142 // Append the second string.
143 result += second;
144
145 // And return the whole mess.
146 return result;
147}

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected