Here you can find the source of unescape(String escapedMessage)
Parameter | Description |
---|---|
escapedMessage | a parameter |
public static String unescape(String escapedMessage)
//package com.java2s; //License from project: Open Source License public class Main { public static final String SEPARATOR = "|"; /**/*from w w w . j a v a 2 s . com*/ * Returns a string with all escaped occurrence of StringUtils.SEPARATOR unescaped * @param escapedMessage * @return */ public static String unescape(String escapedMessage) { return unescape(escapedMessage, SEPARATOR); } /** * Returns a string with all escaped occurrence of reserved unescaped * @param escapedMessage * @param reserved * @return */ public static String unescape(String escapedMessage, String reserved) { String escaped = String.format("\\%s", reserved); return escapedMessage.replace(escaped, reserved).replaceFirst("\\\\ $", "\\\\"); } }