Sometimes it is odd to get TLD itself from the
cutToFirstSignificantSubdomain() (since you will not get TLD itself if
you pass it directly):
- cutToFirstSignificantSubdomain('org') -> ""
- cutToFirstSignificantSubdomain('www.org') -> org
- cutToFirstSignificantSubdomain('kernel.org') -> kernel.org
- cutToFirstSignificantSubdomain('www.kernel.org') -> kernel.org
So add one more function to get www.org in this case:
- cutToFirstSignificantSubdomainWithWWW('org') -> ""
- cutToFirstSignificantSubdomainWithWWW('www.org') -> www.org
- cutToFirstSignificantSubdomainWithWWW('kernel.org') -> kernel.org
- cutToFirstSignificantSubdomainWithWWW('www.kernel.org') -> kernel.org
P.S. not sure about the naming though, so it will great if someone has
suggestion for the name.