isDomainName static method
Checks if the given string s
is a domain name.
Will return false if the given string s
starts with www. or *.
Implementation
static bool isDomainName(String s) {
if (s.startsWith('*.') || isSubDomain(s)) {
return false;
}
return parseDomain(s) != null;
}