VirtualPathUtility::RemoveTrailingSlash Method (String^)
.NET Framework (current version)
Removes a trailing slash mark (/) from a virtual path.
Assembly: System.Web (in System.Web.dll)
Parameters
- virtualPath
-
Type:
System::String^
The virtual path to remove any trailing slash mark from.
Return Value
Type: System::String^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.
.NET Framework
Available since 2.0
Available since 2.0
Show: