MCPcopy Create free account
hub / github.com/argotorg/solidity / stripFileUriSchemePrefix

Function stripFileUriSchemePrefix

libsolidity/lsp/Utils.cpp:117–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117std::string stripFileUriSchemePrefix(std::string const& _path)
118{
119 std::regex const windowsDriveLetterPath("^file:///[a-zA-Z]:/");
120 if (regex_search(_path, windowsDriveLetterPath))
121 return _path.substr(8);
122 if (_path.find("file://") == 0)
123 return _path.substr(7);
124 else
125 return _path;
126}
127
128}

Callers 3

uriToSourceUnitNameMethod · 0.85
readFileMethod · 0.85
handleInitializeMethod · 0.85

Calls 1

findMethod · 0.45

Tested by

no test coverage detected