toStringAsExponential abstract method
String toStringAsExponential(Returns an exponential string-representation of this
.
Converts this
to a double before computing the string representation.
If fractionDigits
is given then it must be an integer satisfying: 0 <= fractionDigits <= 20
. In this case the string contains exactly fractionDigits
after the decimal point. Otherwise, without the parameter, the returned string uses the shortest number of digits that accurately represent this
.
If fractionDigits
equals 0 then the decimal point is omitted. Examples:
1.toStringAsExponential(); // 1e+0 1.toStringAsExponential(3); // 1.000e+0 123456.toStringAsExponential(); // 1.23456e+5 123456.toStringAsExponential(3); // 1.235e+5 123.toStringAsExponential(0); // 1e+2
Source
String toStringAsExponential([int fractionDigits]);
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-core/num/toStringAsExponential.html