significantDigits

Returns the number of significant digits in a numeric string.

Significant digits are those needed to represent a number in exponential notation.

@safe pure
size_t
significantDigits
(
const char[] numericString
)

Examples

22.345 - 5 digits 10.010 - 4 digits 0.0032 - 2 digits

Meta