Sisk

Method

PathHelper.NormalizePath

Namespace
Sisk.Core.Helpers
Assembly
Sisk.Core.dll

NormalizePath(string, char, bool) #

Normalize the given path to use the specified directory separator, trim the last separator and remove empty entries.

C#
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.

Returns #

string

Type to search the documentation and the API reference.