Java String Truncate truncateUrl(String url)

Here you can find the source of truncateUrl(String url)

Description

truncate Url

License

Apache License

Declaration

public static String truncateUrl(String url) 

Method Source Code

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

public class Main {
    public static String truncateUrl(String url) {
        if (url.contains("?"))
            url = url.substring(0, url.indexOf("?"));
        return url;
    }//from   w w w.jav a  2 s.  co m
}

Related

  1. truncateToLength(String inputString, int truncateLength)
  2. truncateToMaxLen(String input, int len)
  3. truncateType(String s)
  4. truncateType(String type)
  5. truncateUri(String uri)
  6. TruncateUrlPage(String strURL)
  7. truncateValue(String value, int limit, String endChars)
  8. truncateWhenUTF8(final String s, final int maxBytes)
  9. truncateWhiteSpace(int len, int tabSize, String indentStr)