Replacement for snprintf
dlang at d-ecke.de
Thu Nov 7 09:24:05 UTC 2019
On Wednesday, 6 November 2019 at 16:54:25 UTC, Andre Pany wrote:
> This question comes late, but did you considered to just do an
> 1 to 1 translation of snprintf from C to D?
I scanned through the implementation of snprintf several times
while I wrote the replacement. I think, the main algorithm is
quite similar, apart from some speed improvement for numbers
close to zero, which turned out to be quite nasty in detail (and
which for now I skipped therefore).
By the way: A 1 to 1 translation would not be something, I could
do, because my knowledge of C is very little and the algorithm
contains lot's of calls to functions I do not know, where to look
them up and how to replace them with D functions.
More information about the Digitalmars-d