TLDExtract
public class TLDExtract
TLDExtract is a class that extracts the top-level domain (TLD) from a given hostname. It can fetch the public suffix list from a remote source or use a frozen dataset.
Throws
Throws:
- TLDExtractError.pslParseError if there is an error while parsing the public suffix list.
Parameters
useFrozenData
|
A Boolean value indicating whether to use a pre-fetched public suffix list. |
-
Undocumented
Declaration
Swift
public init(useFrozenData: Bool = false) throws
-
Parameters:
- host: Hostname to be extracted
- quick: If true, parse only normal data excluding exceptions and wildcards
Declaration
Swift
public func parse<T>(_ input: T, quick: Bool = false) -> TLDResult? where T : TLDExtractable