public static String toFixedSize(String s, char pad, int size) {
		String trimmed = trim(s, size + ELLIPSES.length());
		String padded = pad(trimmed, pad, -size);
		return padded;
	}
Enforces the given length upon the given string by trimming and then padding as necessary.

@param s the String to fix
@param pad the pad character to use if padding is required
@param size the desired size of the string
@return the fixed string
Ghidra/Framework/Generic/src/main/java/ghidra/util/StringUtilities.java