Can someone point me to a source code file or package that has a nice, reusable sprintf () implementation in C that I can customize according to my own needs?
Explanation why I need it: strings do not have a zero end in my code (compatible with binary). Therefore, sprintf ("% s") is useless unless I correct the code to figure out how to render the string.
Thanks to quinmars for indicating that there is a way to print a line through% s without ending it with a null value. Although it solves the problem now, I will eventually need an implementation of sprintf (or snprintf) for higher level functions that use options. Of the others mentioned so far, it seems to me that the implementation of SQLite is the best. Thanks to Doug Currie for pointing this out.
source
share