Fedora Packages

stb_sprintf-devel Subpackage of stb

Fast sprintf, snprintf for C/C++

This is a full sprintf replacement that supports everything that the C runtime sprintfs support, including float/double, 64-bit integers, hex floats, field parameters (%*.*d stuff), length reads backs, etc. Why would you need this if sprintf already exists? Well, first off, it’s *much* faster (see below). It’s also much smaller than the CRT versions code-space-wise. We’ve also added some simple improvements that are super handy (commas in thousands, callbacks at buffer full, for example). Finally, the format strings for MSVC and GCC differ for 64-bit integers (among other small things), so this lets you use the same format strings in cross platform code. It uses the standard single file trick of being both the header file and the source itself. If you just include it normally, you just get the header file function definitions. To get the code, you include it from a C or C++ file and define STB_SPRINTF_IMPLEMENTATION first. It only uses va_args macros from the C runtime to do its work. It does cast doubles to S64s and shifts and divides U64s, which does drag in CRT code on most platforms. It compiles to roughly 8K with float support, and 4K without. As a comparison, when using MSVC static libs, calling sprintf drags in 16K.

Releases Overview

Release Stable Testing
Fedora Rawhide 1.10^20241002git31707d1-2.fc42 -
Fedora 41 1.10^20241002git31707d1-1.fc41 -
Fedora 40 1.10^20241002git31707d1-1.fc40 -
Fedora EPEL 9 1.10^20241002git31707d1-1.el9 -
Fedora EPEL 8 1.10-0.49.20241002git31707d1.el8 -
Fedora EPEL 10.0 1.10^20241002git31707d1-2.el10_0 -
File a new bug report »
Package Info
Related Packages

You can contact the maintainers of this package via email at stb dash maintainers at fedoraproject dot org.



Sources on Pagure