Internet Direct (Indy) Version 9.0.2 Beta
IsTopDomain
Checks an address for the presence of a top-level domain name.

function IsTopDomain(s: string): Boolean;
Parameters
s: string
Address to be examined.

Returns
Boolean - True when the address is a top-level domain name.

Description
IsTopDomain is a Boolean function that indicates when the value in S represents a top-level domain name. IsTopDomain returns True when the value in S ends with a value recognized as a TLD. For example: COM, ORG, GOV, and EDU. IsTopDomain can also return true when the value in S ends with a country-level domain name sucah as COM.UK, COM.DE, etc.