Number::parse()
proposal
#49974
Unanswered
Giovani-Freitag
asked this question in
Ideas
Replies: 2 comments
-
Do you have the bandwidth to submit a PR with the suggested method? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi, I have just submitted a PR along these lines. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Are there plans to have a parsing helper in the
Number
class?My app is located in
pt_BR
, and I usually need to use theNumberFormatter
library to parse inputs like"10,50"
to10.5
before performing calculations. When I saw this new helper I thought it could help me in this task.Currently, I have to do something like this in a lot of places:
Using a helper, I could have something just like:
If it's necessary to work with other formats, it would be possible with named parameters:
If accessing constants from the
NumberFormatter
library is a problem, maybe there could be specific parses like:It's my first post here, I hope it's on the right place 😅
Beta Was this translation helpful? Give feedback.
All reactions