Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect handling of _ in decimal #99

Merged
merged 2 commits into from
May 12, 2023

Conversation

DanielBauman88
Copy link
Contributor

@DanielBauman88 DanielBauman88 commented May 10, 2023

BigDecimal supports '_' chars as visual
seperators in number strings in the pre and
post "." parts of the number.

The counting of post "." digits however
counts all characters but it should exclude '_' chars.

The underscore support comes from BigDecimal's use of num-bigint
https://github.com/rust-num/num-bigint/blob/6f2b8e0fc218dbd0f49bebb8db2d1a771fe6bafa/src/biguint/convert.rs#L246

#100

BigDecimal supports '_' chars as visual
seperators in number strings in the pre and
post "." parts of the number.

The counting of post "." digits however
counts all characters but it should exclude '_' chars.

The underscore support comes from BigDecimal's use of num-bigint
https://github.com/rust-num/num-bigint/blob/6f2b8e0fc218dbd0f49bebb8db2d1a771fe6bafa/src/biguint/convert.rs#L246

akubera#100
@akubera
Copy link
Owner

akubera commented May 12, 2023

Thank you.

@akubera akubera merged commit 11cf120 into akubera:trunk May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants