MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / removeCommonPrefix

Function removeCommonPrefix

source/utility/fix_embedded_tilesets.cpp:8–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6using namespace Star;
7
8void removeCommonPrefix(StringList& a, StringList& b) {
9 // Remove elements from a and b until there is one that differs.
10 while (a.size() > 0 && b.size() > 0 && a[0] == b[0]) {
11 a.eraseAt(0);
12 b.eraseAt(0);
13 }
14}
15
16String createRelativePath(String fromFile, String toFile) {
17 if (!File::isDirectory(fromFile))

Callers 1

createRelativePathFunction · 0.85

Calls 2

eraseAtMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected