Everything needed to run simple Rust programs (#40)

* Everything needed to run simple Rust programs

* Add IsDBCSLeadByte implementation

* Address PR comments
This commit is contained in:
2023-09-09 23:07:23 -04:00
committed by GitHub
parent 6e18120410
commit 94b44fd697
18 changed files with 1106 additions and 151 deletions

View File

@@ -15,6 +15,11 @@ namespace files {
std::string str = inStr;
std::replace(str.begin(), str.end(), '\\', '/');
// Remove "//?/" prefix
if (str.rfind("//?/", 0) == 0) {
str.erase(0, 4);
}
// Remove the drive letter
if (str.rfind("z:/", 0) == 0 || str.rfind("Z:/", 0) == 0) {
str.erase(0, 2);