public static String padRight(String inputString, int size, char paddingChar) {

		final String stringToPad;

		if (inputString == null) {
			stringToPad = "";
		}
		else {
			stringToPad = inputString;
		}

		StringBuilder padded = new StringBuilder(stringToPad);
		while (padded.length() < size) {
			padded.append(paddingChar);
		}
		return padded.toString();
	}
Right-pad a String with a configurable padding character.

@param inputString The String to pad. A {@code null} String will be treated like an empty String.
@param size Pad String by the number of characters.
@param paddingChar The character to pad the String with.
@return The padded String. If the provided String is null, an empty String is returned.
spring-xd-shell/src/main/java/org/springframework/xd/shell/util/CommonUtils.java