[android-components](../../index.md) / [mozilla.components.lib.publicsuffixlist.ext](../index.md) / [kotlin.String](index.md) / [urlToTrimmedHost](./url-to-trimmed-host.md)

# urlToTrimmedHost

`fun `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`.urlToTrimmedHost(publicSuffixList: `[`PublicSuffixList`](../../mozilla.components.lib.publicsuffixlist/-public-suffix-list/index.md)`): Deferred<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/lib/publicsuffixlist/src/main/java/mozilla/components/lib/publicsuffixlist/ext/String.kt#L17)

Trim a host's prefix and suffix

