trimHex static method

String trimHex(
  1. String hex
)

Implementation

static String trimHex(String hex) {
  if (hex.startsWith(RegExp('^0[xX]'))) return hex.substring(2);
  return hex;
}