Java URL Sanitize sanitizeUri(String uri)

Here you can find the source of sanitizeUri(String uri)

Description

sanitize Uri

License

Apache License

Declaration

private static String sanitizeUri(String uri) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static String sanitizeUri(String uri) {
        if (uri.endsWith("/")) {
            uri = uri.substring(0, uri.length() - 1);
        }/*from  ww  w .  j  a  v  a  2  s.  co m*/
        return uri.replaceAll("//", "/");
    }
}

Related

  1. sanitizeCollabNetUrl(String url)
  2. sanitizeDefaultPort(String url)
  3. sanitizeForNextUrl(String url)
  4. sanitizeUri(String uri)
  5. sanitizeURL(String url)
  6. sanitizeUrl(String url)
  7. sanitizeUrl(String url)