significantDigits

Returns the number of significant digits in a numeric string.

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

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

Examples

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

Meta