PyFunceble/__init__.py
def is_subdomain(domain):  # pragma: no cover
    """
    Check if the given domain is a subdomain.

    :param domain: The domain we are checking.
    :type domain: str

    :return: The subdomain state.
    :rtype: bool

    .. warning::
        If an empty or a non-string :code:`domain` is given, we return :code:`None`.
    """

    if domain and isinstance(domain, str):
        # * The given domain is not empty nor None.
        # and
        # * The given domain is a string.

        # We silently load the configuration.
        load_config(True)

        return Check(domain).is_subdomain()

    # We return None, there is nothing to check.
    return None
def is_subdomain(domain):  # pragma: no cover
    if domain and isinstance(domain, str):
        # * The given domain is not empty nor None.
        # and
        # * The given domain is a string.

        # We silently load the configuration.
        load_config(True)

        return Check(domain).is_subdomain()

    # We return None, there is nothing to check.
    return None
def is_subdomain ( domain ) : # pragma: no cover if domain and isinstance ( domain , str ) : # * The given domain is not empty nor None. # and # * The given domain is a string. # We silently load the configuration. load_config ( True ) return Check ( domain ) . is_subdomain ( ) # We return None, there is nothing to check. return None
Check if the given domain is a subdomain.

    :param domain: The domain we are checking.
    :type domain: str

    :return: The subdomain state.
    :rtype: bool

    .. warning::
        If an empty or a non-string :code:`domain` is given, we return :code:`None`.
Check if the given domain is a subdomain .