file_util: Add platform-specific slash option to SanitizePath
This commit is contained in:
parent
3bf488ce52
commit
3f82dad1e4
2 changed files with 16 additions and 5 deletions
|
@ -182,8 +182,9 @@ std::vector<T> SliceVector(const std::vector<T>& vector, size_t first, size_t la
|
|||
return std::vector<T>(vector.begin() + first, vector.begin() + first + last);
|
||||
}
|
||||
|
||||
// Removes trailing slash, makes all '\\' into '/', and removes duplicate '/'.
|
||||
std::string SanitizePath(std::string_view path);
|
||||
// Removes trailing slash, makes all '\\' into '/', and removes duplicate '/'. Makes '/' into '\\'
|
||||
// if windows and with_platform_slashes is true.
|
||||
std::string SanitizePath(std::string_view path, bool with_platform_slashes = false);
|
||||
|
||||
// simple wrapper for cstdlib file functions to
|
||||
// hopefully will make error checking easier
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue