strip0x function

String strip0x(
  1. String hex
)

If present, removes the 0x from the start of a hex-string.

Implementation

String strip0x(String hex) {
  if (hex.startsWith('0x')) return hex.substring(2);
  return hex;
}