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

Function JoinPath

plugins/jieba/src/JiebaSegmentationPlugin.cpp:105–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105std::string JoinPath(const std::string& left, const std::string& right) {
106 if (left.empty()) {
107 return right;
108 }
109 const char last = left.back();
110 if (last == '/' || last == '\\') {
111 return left + right;
112 }
113 return left + "/" + right;
114}
115
116bool EndsWith(const std::string& value, const std::string& suffix) {
117 return value.size() >= suffix.size() &&

Callers 1

ResolveResourcePathFunction · 0.70

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected