Normalizes the path separator in a given path string to either "/" or "\".
Replaces all occurrences of the opposite separator with the specified one, and collapses any duplicate separators into a single instance.
The input path string to normalize.
Optional
The desired path separator ("/" or "\"). Defaults to "/".
The normalized path string with consistent separators.
4.0.0
2022-08-31
Normalizes the path separator in a given path string to either "/" or "\".
Replaces all occurrences of the opposite separator with the specified one, and collapses any duplicate separators into a single instance.