php-bignumbers icon indicating copy to clipboard operation
php-bignumbers copied to clipboard

fromFloat: Ensure dot as decimal point.

Open apapsch opened this issue 5 years ago • 0 comments

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.

apapsch avatar Jan 28 '20 10:01 apapsch