pub(crate) fn make_num(
digits: &str,
hasdot: bool,
state: NumeralMode,
) -> Result<Unsigned36Bit, StringConversionFailed>Expand description
Convert a string to an Unsigned36Bit.
§Combining state and hasdot
state | hasdot | Conversion Base |
|---|---|---|
NumeralMode::Octal | false | Octal |
NumeralMode::Decimal | false | Decimal |
NumeralMode::Octal | true | Decimal |
NumeralMode::Decimal | true | Octal |
§Arguments
digits- the octal or decimal digitshasdot- if true, the input has a trailing dot (not indigits).state- indicates whether the default mode is octal or decimal.
TODO: consider just having the caller call make_u36() directly.