xtd 0.2.0
Loading...
Searching...
No Matches

◆ local_path()

xtd::ustring xtd::uri::local_path ( ) const

Gets the original URI string that was passed to the xtd::uri constructor.

Returns
string A string containing the exact URI specified when this instance was constructed; otherwise, Empty.
Exceptions
xtd::invalid_operation_exceptionThis instance represents a relative URI, and this property is valid only for absolute URIs.
Remarks
If the URI specified to the constructor contained leading or trailing spaces, these spaces are preserved.
The value returned by this property differs from to_string and absolute_uri. to_string returns the canonically unescaped form of the URI. absolute_uri returns the canonically escaped form of the URI.
When International Resource Identifier (URI) and Internationalized Domain Name (IDN) support are enabled, original_string returns the original non normalized string with Punycode host name if one was used to initialize the xtd::uri instance. Punycode names contain only ASCII characters and always start with the xn– prefix.
For more information on URI support, see the Remarks section for the xtd::uri class.
When a xtd::uri object is serialized, the original_string is not preserved. The serialization process uses the fully escaped and canonicalized absolute_uri property when serializing. For a xtd::uri that contains an IPv6 address, the IPv6 address and the scope ID are included in the serialized xtd::uri object.