Example usage for java.lang String replace

List of usage examples for java.lang String replace

Introduction

In this page you can find the example usage for java.lang String replace.

Prototype

public String replace(CharSequence target, CharSequence replacement) 

Source Link

Document

Replaces each substring of this string that matches the literal target sequence with the specified literal replacement sequence.

Usage

From source file:Main.java

public static String correctFilePath(String path) {
    return path.replace("/storage/emulated/0/", "/sdcard/");
}

From source file:Main.java

public static String removeLineBreaks(String str) {
    return str.replace(System.getProperty("line.separator"), " ");
}

From source file:Main.java

public static String replaceSSymbol(String pStr) {
    return pStr.replace("\\n", "");
}

From source file:Main.java

public static String convFbId(String fbId) {
    return fbId.replace("Facebook:", "");
}

From source file:Main.java

public static String removeQuote(String input) {
    return input.replace("\'", "");
}

From source file:Main.java

public static String ReplaceCDATA(String xml) {
    xml = xml.replace("<![CDATA[", "CDATA_B");
    return xml.replace("]]>", "CDATA_E");
}

From source file:Main.java

private static String XMLCleanup(String text) {
    return text.replace("&amp;", "&");
}

From source file:Main.java

public static String RestoreCDATA(String xml) {
    xml = xml.replace("CDATA_B", "<![CDATA[");
    return xml.replace("CDATA_E", "]]>");
}

From source file:Main.java

public static String normaliseEolns(String value) {
    return value.replace("\r\n", "\r").replace("\n", "\r").replace("\r", "\r\n");
}

From source file:Main.java

public static String parseFunctionName(String jsUrl) {
    return jsUrl.replace("javascript:WebViewJavascriptBridge.", "").replaceAll("\\(.*\\);", "");
}