Replacement for snprintf

berni44 dlang at d-ecke.de
Wed Oct 30 19:35:56 UTC 2019


On Wednesday, 30 October 2019 at 19:28:27 UTC, Ali Çehreli wrote:
> Just to make sure, you are aware of the optional '-' before 
> '(', right? "%-(%s%)" does not print the quotes.

I know this. I personally think, it is somewhat ugly, but I 
understand how it came to have it like this. My rationale is more 
like this: Currently it probably won't be possible to change the 
behavior of %s, because that would be a code breaking change. But 
there might be a time in the future, where it's possible to do 
some code breaking changes, maybe when D2 -> D2.1 or something 
like this. It will be much easier to do these changes at that 
time, when there is a well tested, simple and working alternative 
that can be pointed out to the users. Therefore it's a good idea 
to implement this alternative right now. Isn't it?


More information about the Digitalmars-d mailing list