Here you can find the source of cleanURL(final String input)
Parameter | Description |
---|---|
input | a parameter |
public static synchronized String cleanURL(final String input)
//package com.java2s; /*//www . j av a2s .co m * TextUtils.java * * Created on October 28, 2005, 10:33 PM * * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ public class Main { /** * This method is used to remove extra characters from a URL. * Thoug not entirely scientific, it will get rid of things like trailing * quotation marks * @param input * @return */ public static synchronized String cleanURL(final String input) { // Remove quotation marks String output = input.replace("\"", ""); // convert spaces to %22 output = output.replace(" ", "%22"); return output; } }