Added StrNormalizePath() to Utils.cpp.

This commit is contained in:
NovaRain
2019-12-25 09:15:35 +08:00
parent 71803ff06c
commit b984568b32
2 changed files with 10 additions and 0 deletions
+8
View File
@@ -61,4 +61,12 @@ const char* strfind(const char* source, const char* word) {
return 0;
}
// replace all '/' chars to '\'
void StrNormalizePath(char* path) {
if (*path == 0) return;
do {
if (*path == '/') *path = '\\';
} while (*(++path) != 0);
}
}
+2
View File
@@ -34,4 +34,6 @@ void strtrim(char* str);
const char* strfind(const char* source, const char* word);
void StrNormalizePath(char* path);
}