Path.TrimEndingDirectorySeparator 方法

定义

重载

TrimEndingDirectorySeparator(ReadOnlySpan<Char>)

剪裁一个超出指定路径根目录的尾随目录分隔符。

TrimEndingDirectorySeparator(String)

剪裁一个超出指定路径根目录的尾随目录分隔符。

TrimEndingDirectorySeparator(ReadOnlySpan<Char>)

Source:
Path.cs
Source:
Path.cs
Source:
Path.cs

剪裁一个超出指定路径根目录的尾随目录分隔符。

public:
 static ReadOnlySpan<char> TrimEndingDirectorySeparator(ReadOnlySpan<char> path);
public static ReadOnlySpan<char> TrimEndingDirectorySeparator (ReadOnlySpan<char> path);
static member TrimEndingDirectorySeparator : ReadOnlySpan<char> -> ReadOnlySpan<char>
Public Shared Function TrimEndingDirectorySeparator (path As ReadOnlySpan(Of Char)) As ReadOnlySpan(Of Char)

参数

path
ReadOnlySpan<Char>

要剪裁的路径。

返回

不带任何尾随目录分隔符的 path

适用于

TrimEndingDirectorySeparator(String)

Source:
Path.cs
Source:
Path.cs
Source:
Path.cs

剪裁一个超出指定路径根目录的尾随目录分隔符。

public:
 static System::String ^ TrimEndingDirectorySeparator(System::String ^ path);
public static string TrimEndingDirectorySeparator (string path);
static member TrimEndingDirectorySeparator : string -> string
Public Shared Function TrimEndingDirectorySeparator (path As String) As String

参数

path
String

要剪裁的路径。

返回

不带任何尾随目录分隔符的 path

适用于