browserchooser 0.0.2
A simple browser chooser.
Loading...
Searching...
No Matches
basedomain.h File Reference
#include <QtCore/QString>
Include dependency graph for basedomain.h:

Go to the source code of this file.

Functions

QString getBaseDomain (const QString &domain)

Function Documentation

◆ getBaseDomain()

QString getBaseDomain ( const QString & domain)
nodiscard

Returns the registrable/base domain for the given host. E.g. google.com from www.google.com, amazon.co.uk from www.amazon.co.uk.

Parameters
domainThe domain (e.g. host from URL).
Returns
The base domain (last 2 or 3 labels depending on known two-part TLDs).