MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / join

Function join

modules/mono/utils/path_utils.cpp:180–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180String join(const String &p_a, const String &p_b) {
181 if (p_a.is_empty()) {
182 return p_b;
183 }
184
185 const char32_t a_last = p_a[p_a.length() - 1];
186 if ((a_last == '/' || a_last == '\\') ||
187 (p_b.size() > 0 && (p_b[0] == '/' || p_b[0] == '\\'))) {
188 return p_a + p_b;
189 }
190
191 return p_a + "/" + p_b;
192}
193
194String join(const String &p_a, const String &p_b, const String &p_c) {
195 return Path::join(Path::join(p_a, p_b), p_c);

Callers 8

find_executableFunction · 0.85
abspathFunction · 0.85
get_latest_fxrFunction · 0.85

Calls 3

sizeMethod · 0.65
is_emptyMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected