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

◆ is_base_of()

bool xtd::uri::is_base_of ( const xtd::uri uri) const

Determines whether the current xtd::uri instance is a base of the specified xtd::uri instance.

Parameters
uriThe specified xtd::uri instance to test.
Returns
bool true if the current xtd::uri instance is a base of uri; otherwise, false.
Exceptions
ArgumentNullExceptionuri is null.
Remarks
IsBaseOf is used to compare the current xtd::uri instance to a specified xtd::uri to determine whether this URI is a base for the specified xtd::uri. When comparing two xtd::uri objects to determine a base relationship, the user information (user_info) is not evaluated. When comparing two URIs (uri1 and uri2), uri1 is the base of uri2 if, when you ignore everything in uri2 after the last slash (/), the two URIs are identical. Using http://host/path/path/file?query as the base URI, the following table shows whether it is a base for other URIs.
URI http://host/path/path/file?query is base of
http://host/path/path/file/ yes
http://host/path/path/#fragment yes
http://host/path/path/MoreDir/" yes
http://host/path/path/OtherFile?Query yes
http://host/path/path/ yes
http://host/path/path/file yes
http://host/path/path no
http://host/path/path?query no
http://host/path/path#fragment no
http://host/path/path2/ no
http://host/path/path2/MoreDir no
http://host/path/File no