Android Utililty Methods URL Normalize

List of utility methods to do URL Normalize

Description

The list of methods to do URL Normalize are organized into topic(s).

Method

StringnormalizeUrl(String url)
Simple url normalization that adds http:// if no scheme exists, and strips empty paths, e.g., www.google.com/ -> http://www.google.com.
String normalized;
if (url != null) {
    int start;
    int schemePos = url.indexOf(SCHEME_SEPARATOR);
    if (schemePos == -1) {
        normalized = DEFAULT_SCHEME + SCHEME_SEPARATOR + url;
        start = DEFAULT_SCHEME.length() + SCHEME_SEPARATOR.length();
    } else {
...