Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

fromFloat: Ensure dot as decimal point.#74

Open
apapsch wants to merge 1 commit intoCoder-Spirit:masterfrom
apapsch:master
Open

fromFloat: Ensure dot as decimal point.#74
apapsch wants to merge 1 commit intoCoder-Spirit:masterfrom
apapsch:master

Conversation

@apapsch
Copy link

@apapsch apapsch commented Jan 28, 2020

String conversion is locale aware, because its primary use case
is for display purposes. This hack assumes that the only other
decimal point is a comma, which gets replaced by dot.

Alternatively, locale could be set to C before conversion and
restored after conversion, although this might incur an
performance penalty, because setlocale does I/O.

String conversion is locale aware, because its primary use case
is for display purposes. This hack assumes that the only other
decimal point is a comma, which gets replaced by dot.

Alternatively, locale could be set to C before conversion and
restored after conversion, although this might incur an
performance penalty, because setlocale does I/O.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant