Class DomainStringUtils

java.lang.Object
de.mtg.jzlint.utils.DomainStringUtils

public final class DomainStringUtils extends Object
  • Method Details

    • domainMatches

      public static boolean domainMatches(String domain, String rule)
      https://github.com/publicsuffix/list/wiki/Format#format

      A domain is said to match a rule if and only if all of the following conditions are met: When the domain and rule are split into corresponding labels, that the domain contains as many or more labels than the rule. Beginning with the right-most labels of both the domain and the rule, and continuing for all labels in the rule, one finds that for every pair, either they are identical, or that the label from the rule is "*".

    • getLabels

      public static List<String> getLabels(String rule)
    • isLDHLabel

      public static boolean isLDHLabel(String label)