core/src/main/java/nl/nn/adapterframework/util/Misc.java
/**
	 * Concatenates two strings, if specified, uses the separator in between two strings. 
	 * Does not use any seperators if both or one of the strings are empty.
	 *<p>
	 *     Example:
	 *     <pre>
	 *         String a = "We";
	 *         String b = "Frank";
	 *         String seperator = "Are";
	 *         String res = Misc.concatStrings(a, seperator, b);
	 *         System.out.println(res); // prints "WeAreFrank"
	 *     </pre>
	 * </p>
	 * @param part1 First string
	 * @param separator Specified separator
	 * @param part2 Second string
	 * @return the concatenated string
	 */
Concatenates two strings, if specified, uses the separator in between two strings.
Does not use any seperators if both or one of the strings are empty.
Concatenates two strings if specified uses the separator in between two strings . Does not use any seperators if both or one of the strings are empty .
public static String concatStrings(String part1, String separator, String part2) {
		if (StringUtils.isEmpty(part1)) {
			return part2;
		}
		if (StringUtils.isEmpty(part2)) {
			return part1;
		}
		return part1+separator+part2;
	}
public static String concatStrings ( String part1 , String separator , String part2 ) { if ( StringUtils . isEmpty ( part1 ) ) { return part2 ; } if ( StringUtils . isEmpty ( part2 ) ) { return part1 ; } return part1 + separator + part2 ; }
Concatenates two strings, if specified, uses the separator in between two strings.
Concatenates two strings if specified uses the separator in between two strings .