List of usage examples for java.lang String replace
public String replace(CharSequence target, CharSequence replacement)
From source file:Main.java
/** * To escape characters that can not be used in the file name from the URI. * /*from ww w . j a v a 2 s .c om*/ * @param uri * @return */ private static String escapeUri(String uri) { return uri.replace("://", "_").replace("/", "_"); }
From source file:Main.java
public static String xmlDecode(String string) { return string.replace("&", "&").replace("'", "'").replace(""", "\"").replace("<", "<") .replace(">", ">"); }
From source file:Main.java
public static String separator(String path) { path = path.replace('\\', '/'); if (!path.endsWith("/")) path = path + "/"; return path;//from www. jav a 2 s. co m }
From source file:Main.java
public static String replaceInvalidCharacters(String data) { data = data.replace("\u010D", "c"); data = data.replace("\u010C", "C"); return data;//from w w w. j ava 2 s.c om }
From source file:Main.java
public static String convertPackageName2Apk(String packageName) { return packageName.replace(".", "_") + ".apk"; }
From source file:Main.java
public static String parseFunctionName(String paramString) { return paramString.replace("javascript:WemartJSBridge.", "").replaceAll("\\(.*\\);", ""); }
From source file:Main.java
public static String convertPackageName2Script(String packageName) { return packageName.replace(".", "_") + ".txt"; }
From source file:Main.java
static String UnescapeHTML(String html) { html = html.replace("<", "<"); html = html.replace(">", ">"); html = html.replace(""", "\""); html = html.replace("&", "&"); return html;//w w w.j a v a 2 s .c o m }
From source file:Main.java
public static String escapeElementValue(String unescaped) { return unescaped.replace("&", "&").replace("<", "<").replace(">", ">").replace("'", "'") .replace("\"", """); }
From source file:Main.java
public static String decodeEmail(String encodedEmail) { return encodedEmail.replace(",", "."); }