Replacement for snprintf

Guillaume Piolat first.last at
Mon Nov 4 13:49:08 UTC 2019

On Saturday, 2 November 2019 at 16:59:15 UTC, Jacob Carlborg 
> It depends on what the goal is. If it is to have 100% 
> compatible drop-in replacement to snprintf then we need to 
> include the localization.
> But if the goal is just to have a function that converts values 
> to a string, which is implemented in D, then have the 
> opportunity to make a better interface.

+1 this is important since we've had localization bug and I 
suspect it's very easy to have such bugs.

Warning: `format` is affected too! (perhaps only when using the 
%f format specifier?)
ugly fix:

There is a non-zero chance that people _are_ relying on `format` 
and `snprintf` being localization-aware. So a "drop-in" 
replacement need to fix this mess by being bug-compatible, or not 
being drop-in.

More information about the Digitalmars-d mailing list