source: josm/trunk/src/org/openstreetmap/josm/tools/TextUtils.java@ 14079

Last change on this file since 14079 was 13978, checked in by Don-vip, 6 years ago

fix #16427 - Inserts zero width space character (U+8203) after each slash/amperand to wrap long URLs in imagery offset panel

  • Property svn:eol-style set to native
File size: 566 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.tools;
3
4/**
5 * Text/String utils.
6 * @since 13978
7 */
8public final class TextUtils {
9
10 private TextUtils() {
11 // Hide default constructor for utils classes
12 }
13
14 /**
15 * Inserts zero width space character (U+8203) after each slash/amperand to wrap long URLs.
16 * @param url URL
17 * @return wrapped URL
18 * @since 13978
19 */
20 public static String wrapLongUrl(String url) {
21 return url.replaceAll("/", "/\u200b").replaceAll("&", "&\u200b");
22 }
23}
Note: See TracBrowser for help on using the repository browser.