AnyUri.Normalize MethodAnyUri.Normalize MethodAnyUri::Normalize Method
Returns a normalized string representation of the current instance.
Return Value
Type: System.StringSystem.StringSystem::String^
A normalized string representation of the current instance.
Remarks
This is equivalent to calling the GetComponentsGetComponentsGetComponents method with the values AbsoluteUriAbsoluteUriAbsoluteUri and UriEscapedUriEscapedUriEscaped.
This method can be used to compare URIs. Normalizing two URIs before comparing them ensures that a larger range of URIs that correspond to the same resource are considered equal.
The following techniques are used to normalize URIs:
- Case normalization of URI scheme, and percent-encoded values.
-
Omission of default ports for some schemes (eg. port 21 for the
ftp:
scheme). The StrongPortStrongPortStrongPort value can be used to include the port if it is the default value. - Resolution of dot-segments (
..
and.
path segments). - Normalization of '/' and '\' characters in
file:
paths residing onlocalhost
.