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

Method extension

source/core/StarAssetPath.cpp:113–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113String AssetPath::extension(String const& path) {
114 auto file = filename(path);
115 auto lastDot = file.findLast(".");
116 if (lastDot == NPos)
117 return "";
118
119 return file.substr(lastDot + 1);
120}
121
122String AssetPath::relativeTo(String const& sourcePath, String const& givenPath) {
123 if (!givenPath.empty() && givenPath[0] == '/')

Callers

nothing calls this directly

Calls 2

findLastMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected