This documentation is archived and is not being maintained.

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The SubdomainOf function tests whether one domain is a subdomain of another specified domain.

Syntax

bool SubdomainOf(
  string uri,
  string uriTemplate
);

Parameters

uri

The URI to test for subdomain membership within uriTemplate.

uriTemplate

A domain.

Return Values

Returns true if uri is a subdomain of uriTemplate; false if it is not.

Remarks

Parameter values must include the scheme portion of the URI, for example "sip:someone@example.com".

For SIP URIs (URIs that begin with "sip:" or "sips:"), this function performs a postfix match on the domain. For example, "test.msn.com" is identified as a subdomain of "msn.com".

The wildcard character ("*") and regular expressions are not supported.

Show: