Replacement for snprintf

Rumbu rumbu at rumbu.ro
Wed Nov 6 18:21:43 UTC 2019


On Wednesday, 6 November 2019 at 17:28:58 UTC, H. S. Teoh wrote:

>
> Then programs that want to support locales can just do this:
>
> 	writefln("%.2?d", curLocale.separator, 3.141592);
>
>

For %f, the decimal separator is not the only locale specific 
info. Full list:

-decimal separator
-negative pattern
-positive pattern
-infinity symbol
-nan symbol
-digit shapes, especially for Arabic and Thai


For %d and %g there are more like digit grouping/group separator.




More information about the Digitalmars-d mailing list