printDigits static method

String printDigits(
  1. int value,
  2. int count
)

Formats a value as a hexadecimal string.

value: The integer value to format. count: The number of digits to pad to. Returns a hexadecimal string padded with leading zeros.

Implementation

static String printDigits(int value, int count) {
  return value.toRadixString(16).padLeft(count, '0');
}