private String toHumanReadableStringWithPadding(final int width) {
    final BigInteger amount = toBigInteger();
    final int numOfDigits = amount.toString().length();
    final Unit preferredUnit = Unit.getPreferred(numOfDigits);
    final double res = amount.doubleValue() / preferredUnit.divisor;
    return String.format("%" + width + "." + preferredUnit.decimals + "f %s", res, preferredUnit);
  }
Returns a human-readable String, the number of returned characters depends on the width
parameter

@param width the number of digits to use
@return a human-readable String
datatypes/src/main/java/org/hyperledger/besu/datatypes/Wei.java