List of usage examples for java.lang String replace
public String replace(CharSequence target, CharSequence replacement)
From source file:Main.java
public static String getLinuxPath(String path) { return path.replace("\\", "/"); }
From source file:Main.java
public static String decodeUrlParam(String param) { return param.replace("%%", "/"); }
From source file:Main.java
public static String encodeUrlParam(String param) { return param.replace("/", "%%"); }
From source file:Main.java
/** * Creates a dotted class name from a path/package name *///from w ww. j av a 2 s . co m public static String c(String p) { return p.replace('/', '.'); }
From source file:Main.java
public final static String escapedXml(String string) { return string.replace("&", "&").replace("<", "<").replace(">", ">"); }
From source file:Main.java
public static long ConvertMacToLong(String mac) { mac = mac.replace(":", ""); long id = Long.parseLong(mac, 16); return id;/*from w w w . java2 s . c o m*/ }
From source file:Main.java
public static final String encodeCdata(String xml) { return xml.replace(CDATA_CLOSE, CDATA_CLOSE_ENCODE); }
From source file:Main.java
public static String unescape(String text) { return text.replace("<", "<").replace(">", ">").replace(""", "\"").replace("'", "'") .replace("&", "&"); }
From source file:Main.java
public static String escape(String text) { return text.replace("&", "&").replace("<", "<").replace(">", ">").replace("\"", """) .replace("'", "'"); }
From source file:Main.java
public static String stripBOM(String string) { return string.replace("\uFEFF", ""); }