Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Implement falliable and infallible conversion from String #3

Open
lkdm opened this issue Sep 7, 2024 · 0 comments
Open

Implement falliable and infallible conversion from String #3

lkdm opened this issue Sep 7, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@lkdm
Copy link
Owner

lkdm commented Sep 7, 2024

Implement fallible and infallible conversion from String.

Infallible (implement core::str::FromStr):

  1. Strip out alphabetic and special characters, except - and ..
  2. Strip out all . characters after the first.
  3. Perform banker's/half-even rounding up to third decimal place.
  4. Cast as given Int type
  5. Return in Mill Newtype.

Fallible

  1. Return a conversion error if it's not able to be parsed.

Important: Do not depend on std library.

@lkdm lkdm added the enhancement New feature or request label Sep 9, 2024
@lkdm lkdm added this to the v0.2 milestone Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant