Replacement for snprintf
Guillaume Piolat
first.last at gmail.com
Thu Oct 31 10:14:59 UTC 2019
On Thursday, 31 October 2019 at 01:09:14 UTC, Walter Bright wrote:
> Replacing snprintf for floating point is very challenging,
> because:
>
> 1. people have been improving snprintf for decades
> 2. people expect precision and performance
> 3. the standard is snprintf, any credible implementation must
> be the same or better
>
Moreover, actual printf implementations seems to depend upon the
locale. This creates bugs (say "1,4" instead of "1.4") so this
behaviour depends if you want to be bug-compatible. We've been
hit by that in `printed` when used with a Russian locale.
More information about the Digitalmars-d
mailing list