mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added StrNormalizePath() to Utils.cpp.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,4 +34,6 @@ void strtrim(char* str);
|
||||
|
||||
const char* strfind(const char* source, const char* word);
|
||||
|
||||
void StrNormalizePath(char* path);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user