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

Parse comma separated floats #64

Open
WojciechRynczuk opened this issue Feb 3, 2019 · 3 comments
Open

Parse comma separated floats #64

WojciechRynczuk opened this issue Feb 3, 2019 · 3 comments

Comments

@WojciechRynczuk
Copy link
Owner

In some regions of world people use comma as the separator for float numbers. The user log format parser shall take that into account. How about adding another function 'fltc()'?

@WojciechRynczuk WojciechRynczuk added this to the v4.0.1 milestone Feb 3, 2019
@endrjux
Copy link
Collaborator

endrjux commented Mar 5, 2019

Can't we just recognize both . and , without additional function?

@WojciechRynczuk
Copy link
Owner Author

Good question. I just thought that we could reduce the overhead. atof() accepts just a point .. We could automatically convert strings to doubles for the flt() function. fltc() would replace , with . in the first place and then do the conversion.

Still to be decided what we do.

@WojciechRynczuk
Copy link
Owner Author

WojciechRynczuk commented Oct 24, 2019

A simple change in PARSER::FloatResult::FloatResult() shall be sufficient. It would be also good to provide a test.

E.g.

#10 FloatNumber 2,56
#20 FloatNumber 3,14
#30 FloatNumber 9.27

Documentation shall be updated,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants