core/src/main/java/nl/nn/adapterframework/util/Misc.java
/**
	 * Edits the input string according to the regex and the hide method specified.
	 * @see #hideFirstHalf(String, String)
	 * @see #hideAll(String, String)
	 */
Edits the input string according to the regex and the hide method specified.
Edits the input string according to the regex and the hide method specified .
public static String cleanseMessage(String inputString, String regexForHiding, String hideMethod) {
		if (StringUtils.isEmpty(regexForHiding)) {
			return inputString;
		}
		if ("firstHalf".equalsIgnoreCase(hideMethod)) {
			return hideFirstHalf(inputString, regexForHiding);
		} else {
			return hideAll(inputString, regexForHiding);
		}
	}
public static String cleanseMessage ( String inputString , String regexForHiding , String hideMethod ) { if ( StringUtils . isEmpty ( regexForHiding ) ) { return inputString ; } if ( "firstHalf" . equalsIgnoreCase ( hideMethod ) ) { return hideFirstHalf ( inputString , regexForHiding ) ; } else { return hideAll ( inputString , regexForHiding ) ; } }
Edits the input string according to the regex and the hide method specified.
Edits the input string according to the regex and the hide method specified .