util_host_is_in_domain


Description:


[ Version ( since = "3.54" ) ]
public bool util_host_is_in_domain (string? host, string? domain)

Check whether the hostname host is equal to or a subdomain of domain.

Both host and domain are UTF-8 strings and can be IDNs (which will be punycode-encoded for comparison).

Parameters:

host

The hostname to check.

domain

The domain name.

Returns:

true if host is a subdomain of domain (or the same domain). false if not, or if either argument is null or in some way invalid as a domain/hostname.


Namespace: E