toFixedLengthString method

String toFixedLengthString(
  1. int length
)

Implementation

String toFixedLengthString(final int length) {
  return Suppliers.of(this.toString()).map((string) => string.substring(0, min(string.length, length))).map((string) => string.padLeft(length, '0')).get();
}