222 uri& operator =(
const uri&) =
default;
369 [[nodiscard]] auto
host() const ->
xtd::
string;
410 [[nodiscard]] auto
is_unc() const ->
bool;
580 [[nodiscard]] auto
equals(const
xtd::
object& obj) const noexcept ->
bool override;
688 [[nodiscard]] static auto need_to_escape_data_char(
char character) ->
bool;
689 [[nodiscard]] static auto need_to_escape_uri_char(
char character) ->
bool;
690 auto set_fragment(
xtd::
string& escapeUri) ->
void;
691 auto set_host(
xtd::
string& escapeUri) ->
void;
692 auto set_path(
xtd::
string& escapeUri) ->
void;
693 auto set_port(
xtd::
string& escapeUri) ->
void;
694 auto set_query(
xtd::
string& escapeUri) ->
void;
695 auto set_scheme(
xtd::
string& escapeUri) ->
void;
697 auto set_user_info(
xtd::
string& escapeUri) ->
void;
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:23
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
Provides an object representation of a uniform resource identifier (URI) and easy access to the parts...
Definition uri.hpp:103
static const xtd::string uri_scheme_net_tcp
Specifies that the URI is accessed through the NetTcp scheme used by Windows Communication Foundation...
Definition uri.hpp:191
auto is_base_of(const xtd::uri &uri) const -> bool
Determines whether the current xtd::uri instance is a base of the specified xtd::uri instance.
static auto is_well_formed_uri_string(const xtd::string &uri_string, xtd::uri_kind uri_kind) -> bool
Indicates whether the string is well-formed by attempting to construct a URI with the string and ensu...
auto idn_host() const -> xtd::string
Gets the RFC 3490 compliant International Domain Name of the host, using Punycode as appropriate....
auto dns_safe_host() const -> xtd::string
Gets an unescaped host name that is safe to use for DNS resolution.
static auto check_scheme_name(const xtd::string &scheme) -> bool
Determines whether the specified scheme name is valid.
auto get_components(xtd::uri_components components, xtd::uri_format format) const -> xtd::string
Gets the specified components of the current instance using the specified escaping for special charac...
static const xtd::string uri_scheme_nntp
Specifies that the URI is an Internet news group and is accessed through the Network News Transport P...
Definition uri.hpp:211
auto local_path() const -> xtd::string
Gets the original URI string that was passed to the xtd::uri constructor.
auto path_and_query() const -> xtd::string
Gets the absolute_path and query properties separated by a question mark (?).
auto host() const -> xtd::string
Gets the host component of this instance.
auto original_string() const -> const xtd::string &
Gets the original URI string that was passed to the xtd::uri constructor.
auto is_well_formed_original_string() -> bool
Indicates whether the string used to construct this xtd::uri was well-formed and is not required to b...
auto to_string() const noexcept -> xtd::string override
Gets a canonical string representation for the specified xtd::uri instance.
auto host_name_type() const -> xtd::uri_host_name_type
Gets the type of the host name specified in the URI.
static const xtd::string uri_scheme_ftp
Specifies that the URI is accessed through the File Transfer Protocol (FTP). This field is read-only.
Definition uri.hpp:140
auto absolute_uri() -> xtd::string
Gets the absolute URI.
uri()=default
Initializes a new instance of the xtd::uri class.
static auto hex_escape(char character) -> xtd::string
Converts a specified character into its hexadecimal equivalent.
uri(const uri &base_uri, const xtd::string &relative_uri)
Initializes a new instance of the xtd::uri class based on the specified base URI and relative URI str...
static auto is_hex_digit(char character) -> bool
Determines whether a specified character is a valid hexadecimal digit.
auto is_file() const -> bool
Gets a value indicating whether the specified xtd::uri is a file URI.
static auto from_hex(char digit) -> xtd::int32
Gets the decimal value of a hexadecimal digit.
static const xtd::string scheme_delimiter
Specifies the characters that separate the communication protocol scheme from the address portion of ...
Definition uri.hpp:120
auto get_hash_code() const noexcept -> xtd::usize override
Serves as a hash function for a particular type.
auto is_loopback() const -> bool
Gets whether the specified xtd::uri references the local host.
auto user_info() const -> xtd::string
Gets the user name, password, or other user-specific information associated with the specified URI.
auto query() const -> xtd::string
Gets any query information included in the specified URI.
uri(const xtd::string &uri_string)
Initializes a new instance of the xtd::uri class with the specified URI.
auto port() const -> xtd::int32
Gets the port number of this URI.
static const xtd::string uri_scheme_net_pipe
Specifies that the URI is accessed through the NetPipe scheme used by Windows Communication Foundatio...
Definition uri.hpp:188
auto equals(const xtd::object &obj) const noexcept -> bool override
Determines whether the specified object is equal to the current object.
static const xtd::string uri_scheme_file
Specifies that the URI is a pointer to a file. This field is read-only.
Definition uri.hpp:130
uri(const uri &base_uri, const uri &relative_uri)
Initializes a new instance of the xtd::uri class based on the combination of a specified base xtd::ur...
auto scheme() const -> xtd::string
Gets the scheme name for this URI.
auto get_left_part(xtd::uri_partial part) const -> xtd::string
Gets the specified portion of a xtd::uri instance.
static const xtd::string uri_scheme_news
Specifies that the URI is an Internet news group and is accessed through the Network News Transport P...
Definition uri.hpp:201
static const xtd::string uri_scheme_mailto
Specifies that the URI is an e-mail address and is accessed through the Simple Mail Transport Protoco...
Definition uri.hpp:185
auto authority() const -> xtd::string
Gets the Domain Name System (DNS) host name or IP address and the port number for a server.
static auto unescape_data_string(const xtd::string &value) -> xtd::string
Converts a string to its unescaped representation.
static auto escape_data_string(const xtd::string &value) -> xtd::string
Converts a string to its escaped representation.
static const xtd::string uri_scheme_gopher
Specifies that the URI is accessed through the Gopher protocol. This field is read-only.
Definition uri.hpp:150
static auto hex_unescape(const xtd::string &pattern, xtd::usize &index) -> char
Converts a specified hexadecimal representation of a character to the character.
static auto escape_uri_string(const xtd::string &value) -> xtd::string
Converts a URI string to its escaped representation.
auto absolute_path() const -> xtd::string
Gets the absolute path of the URI.
auto is_unc() const -> bool
Gets whether the specified xtd::uri is a universal naming convention (UNC) path.
auto is_absolute_uri() const -> bool
Gets whether the xtd::uri instance is absolute.
auto is_default_port() const -> bool
Gets whether the port value of the URI is the default for this scheme.
static const xtd::string uri_scheme_https
Specifies that the URI is accessed through the Hypertext Transfer Protocol (HTTPS)....
Definition uri.hpp:175
auto fragment() const -> xtd::string
Gets the escaped URI fragment.
static const xtd::string uri_scheme_http
Specifies that the URI is accessed through the Hypertext Transfer Protocol (HTTP)....
Definition uri.hpp:165
auto segments() const -> xtd::array< xtd::string >
Gets an array containing the path segments that make up the specified URI.
static auto is_hex_encoding(const xtd::string &pattern, xtd::usize index) -> bool
Determines whether a character in a string is hexadecimal encoded.
uri(const xtd::string &uri, xtd::uri_kind uri_kind)
Initializes a new instance of the xtd::uri class with the specified URI. This constructor allows you ...
Definition character.hpp:17
#define core_export_
Define shared library export.
Definition core_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition ptr.hpp:27
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
uri_components
This enumeration has a Flags attribute that allows a bitwise combination of its member values.
Definition uri_components.hpp:15
uri_format
Controls how URI information is escaped.
Definition uri_format.hpp:17
auto new_ptr(args_t &&... args) -> xtd::ptr< type_t >
The xtd::new_ptr operator creates a xtd::ptr object.
Definition new_ptr.hpp:24
uri_partial
Defines the parts of a URI for the xtd::uri::get_left_part method.
Definition uri_partial.hpp:15
uri_kind
Defines the kinds of Uris for the xtd::uri::is_well_formed_uri_string and several xtd::uri methods.
Definition uri_kind.hpp:19
uri_host_name_type
Defines host name types for the xtd::uri::check_host_name method.
Definition uri_host_name_type.hpp:15
@ path
The xtd::uri::local_path data.
Definition uri_components.hpp:27
@ absolute
The xtd::uri is an absolute xtd::uri.
Definition uri_kind.hpp:23
Contains xtd::iequatable interface.
Contains xtd::uri suffix.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::string alias.
Contains xtd::uri_components enum.
Contains xtd::uri_host_name_type enum.
Contains xtd::uri_kind enum.
Contains xtd::uri_partial enum.