MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / JoinPath

Function JoinPath

src/ResourceProvider.cpp:84–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84std::string JoinPath(const std::string& root, const std::string& resource) {
85 if (root.empty()) {
86 return resource;
87 }
88 if (IsSeparator(root.back())) {
89 return root + resource;
90 }
91 return root + "/" + resource;
92}
93
94std::string NormalizeResourceName(std::string_view resourceName) {
95 std::string normalized(resourceName);

Callers 1

ResolveMethod · 0.70

Calls 2

IsSeparatorFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected