/** * Escapes the characters in a <code>String</code> using java.util.Properties rules for escaping property values. * * @param string the string to escape values, may be null * @return String with escaped values, <code>null</code> if null string input * @see #dumpString(String, boolean) */ public String propertyValue(Object string) { if (string == null) { return null; } return dumpString(String.valueOf(string), false); }
/** * Escapes the characters in a <code>String</code> using java.util.Properties rules for escaping property keys. * * @param string the string to escape values, may be null * @return String with escaped values, <code>null</code> if null string input * @see #dumpString(String, boolean) */ public String propertyKey(Object string) { if (string == null) { return null; } return dumpString(String.valueOf(string), true); }