android-components / mozilla.components.support.utils / URLStringUtils

URLStringUtils

object URLStringUtils (source)

Functions

Name Summary
isSearchTerm fun isSearchTerm(string: String): Boolean
Determine whether a string is a search term.
isURLLike fun isURLLike(string: String): Boolean
Determine whether a string is a URL.
toDisplayUrl fun toDisplayUrl(originalUrl: CharSequence): CharSequence
Generates a shorter version of the provided URL for display purposes by stripping it of https/http and/or WWW prefixes when applicable.
toNormalizedURL fun toNormalizedURL(string: String): String
Normalizes a URL String.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.