public static String normalise(String value) { // Replace all instances of '\r\n' with '\n' String normalised = replaceAll(value, "\r\n", "\n"); // As all '\r\n' combinations have been replaced, the only thing that should be left are single '\r' characters (if any) // Replace these with '\n' return replaceAll(normalised, "\r", "\n"); }
public static String normalise(String value) { // Replace all instances of '\r\n' with '\n' String normalised = replaceAll(value, "\r\n", "\n"); // As all '\r\n' combinations have been replaced, the only thing that should be left are single '\r' characters (if any) // Replace these with '\n' return replaceAll(normalised, "\r", "\n"); }
public String escapeAmpersand(String str) { return StringUtils.replaceAll(str, "&", "%26"); }
public String removeHtmlBreaks(String str) { str = StringUtils.replaceAll(str, "<br>", ""); str = StringUtils.replaceAll(str, "<br/>", ""); str = StringUtils.replaceAll(str, "<br />", ""); str = StringUtils.replaceAll(str, "<p>", ""); str = StringUtils.replaceAll(str, "</p>", ""); return str; }
public String getEscapeAmpersand(final String str) { return StringUtils.replaceAll(str, "&", "%26"); }
public String getFieldName(final GenericValue changeItem, final I18nHelper i18n) { final String field = changeItem.getString("field"); if (changeItem.getString("fieldtype").toLowerCase().equals("custom")) { return field; } else { final String fieldKey = StringUtils.replaceAll(field, " ", "").toLowerCase(); return i18n.getText("issue.field." + fieldKey); } }
from = StringUtils.replaceAll(from, "${fullname}", name); from = StringUtils.replaceAll(from, "${email}", email); from = StringUtils.replaceAll(from, "${email.hostname}", hostname); return from;