001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.tools; 003 004/** 005 * Text/String utils. 006 * @since 13978 007 */ 008public final class TextUtils { 009 010 private TextUtils() { 011 // Hide default constructor for utils classes 012 } 013 014 /** 015 * Inserts zero width space character (U+8203) after each slash/amperand to wrap long URLs. 016 * @param url URL 017 * @return wrapped URL 018 * @since 13978 019 */ 020 public static String wrapLongUrl(String url) { 021 return url.replace("/", "/\u200b").replace("&", "&\u200b"); 022 } 023}