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

Make it possible to specify a culture for parsing floats #109

Open
keimpema opened this issue Jun 18, 2024 · 1 comment
Open

Make it possible to specify a culture for parsing floats #109

keimpema opened this issue Jun 18, 2024 · 1 comment

Comments

@keimpema
Copy link

I would like to be able to use the built-in number parsers (pfloat, numberLiteral) with a specific culture so that I can parse numbers with a comma as a decimal separator. Correct me if I'm wrong, but this does not seem possible at the moment.

@hglee
Copy link

hglee commented Jun 19, 2024

It is hard coded, you need to write new number parser.

if isDigit c || (c = '.' && (opt &&& allowStartingPoint) = allowStartingPoint) then

System.Double.Parse(nl.String, System.Globalization.CultureInfo.InvariantCulture)

} else if (c == '.') {

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

No branches or pull requests

2 participants