extractExponent static method
Implementation
static int extractExponent(String valueString) {
var parts = valueString.split('.');
String value;
if (parts.length == 2) {
value = removeTrailingZeros(parts.last);
if (value.isNotEmpty) {
return -value.length;
}
}
var cleanedValue = parts.first.replaceAll(RegExp('[+-]'), '');
value = removeTrailingZeros(cleanedValue);
return cleanedValue.length - value.length;
}