VirtualPathUtility.RemoveTrailingSlash(String) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes a trailing slash mark (/) from a virtual path.
public:
static System::String ^ RemoveTrailingSlash(System::String ^ virtualPath);
public static string RemoveTrailingSlash (string virtualPath);
static member RemoveTrailingSlash : string -> string
Public Shared Function RemoveTrailingSlash (virtualPath As String) As String
- virtualPath
- String
The virtual path to remove any trailing slash mark from.
A virtual path without a trailing slash mark, if the virtual path is not already the root directory ("/"); otherwise, null
.
The RemoveTrailingSlash method removes a slash mark (/) from the end of the virtual path. If the virtual path is already the root directory ("/"
), no action is taken. If the virtual path is null
or an empty string (""), the RemoveTrailingSlash method returns null
.
Product | Versions |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: