Method
PathHelper.NormalizePath
NormalizePath(string, char, bool) #
Normalize the given path to use the specified directory separator, trim the last separator and remove empty entries.
public static string NormalizePath(string path, char directorySeparator = '/', bool surroundWithDelimiters = false)Parameters #
path string
The path to normalize.
directorySeparator char
The directory separator.
surroundWithDelimiters bool
true to ensure the result starts and ends with directorySeparator;
otherwise, false. Defaults to false.