padToEven function

String padToEven(
  1. String value
)

Pads a String to have an even length

Implementation

String padToEven(String value) {
  var a = "${value}";

  if (a.length % 2 == 1) {
    a = "0${a}";
  }

  return a;
}