UriFilter
class UriFilter
Filter helper for filtering uris with (or without) particular requirements, conditions or patterns.
Usage example:
Uri.parse("your uri string").filter { absolute() hierarchical() withScheme("mailto", "tel") with { it.query != null } without { it.port == 123 } ... }.getOrNull()
or :
Uri.parse("your uri string").with { it.authority?.isDigitsOnly() ?: false }
Uri.parse("your uri string").without { it.authority.isNullOrEmpty() }