[android-components](../../index.md) / [mozilla.components.feature.top.sites.ext](../index.md) / [kotlin.collections.List](index.md) / [hasUrl](./has-url.md)

# hasUrl

`fun `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`TopSite`](../../mozilla.components.feature.top.sites/-top-site/index.md)`>.hasUrl(url: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/feature/top-sites/src/main/java/mozilla/components/feature/top/sites/ext/TopSite.kt#L14)

Returns true if the given url is in the list top site and false otherwise.

### Parameters

`url` - The URL string.