getHexByteLength function

int getHexByteLength(
  1. String value
)

Implementation

int getHexByteLength(String value) {
  return RegExp(r'^(0x|0X)').hasMatch(value) ? (value.length - 2) ~/ 2 : value.length ~/ 2;
}