MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ExtractLevelName

Function ExtractLevelName

Source/Internal/levelxml.cpp:38–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36#include <tinyxml.h>
37
38void ExtractLevelName(const std::string& path, std::string& str) {
39 int slash_position = path.rfind('/') + 1;
40 int dot_position = path.rfind('.');
41 str = path.substr(slash_position, dot_position - slash_position);
42}
43
44void GetXMLVersionFromDoc(TiXmlDocument& doc, std::string& str) {
45 TiXmlHandle hDoc(&doc);

Callers 1

ParseLevelXMLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected