public static String padIt(String str, int padlen, char endchar, boolean padded) {
		String pad = "0000000000000000000000000000000000000000000000000000000000000000";
		StringBuffer buffer = new StringBuffer();

		// pad the front with zeroes
		if (padded) {
			int len = str.length();

			if (len < padlen) {
				buffer.append(pad.substring(0,padlen-len)); 
			}
		}
		// add the number
		buffer.append(str);

		// add end char if needed
		if (endchar != 0) {
			buffer.append(endchar);
		}
		return buffer.toString();
	}
Creates a string prepended with zeros, if padding is indicated, and adds 
the indicated endchar as the suffix.
@param str the original string
@param padlen length of the padded string without the suffix character.
@param endchar the suffix character
@param padded if true then prepend with zeros
@return return the possibly padded string containing the suffix.
Ghidra/Framework/Generic/src/main/java/ghidra/util/StringFormat.java