Here you can find the source of truncateUrl(String url)
public static String truncateUrl(String url)
//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 }