FixedDecimal.fromString

FixedDecimal fromString(scope const(char)[] text) static @safe pure

Parses an exact decimal literal.

Grammar: optional `+`/`-`, digits with at most one `.`, at least one digit overall; no exponents, no grouping, ASCII digits only. Runtime-scale forms take the fraction length as the scale. Fixed-scale forms require the value to be exactly representable at Scale: shorter fractions upshift, longer fractions accept only discarded zeros.

Parameters

textthe decimal literal.

Returns

The parsed value.

Throws

FixedDecimalException for malformed input or values exceeding

the precision/scale.