stopbits2Int static method

int stopbits2Int(
  1. StopBits stopbits
)

Converts a stopbits enum to an int value;

Implementation

static int stopbits2Int(StopBits stopbits) {
  const tmp = 'StopBits.SB';
  return int.parse(stopbits.toString().substring(tmp.length));
}