Today I'm looking over GNU MultiPrecision's textual serialization library.
This has several public API wrappers around the core logic for different function signatures. And methodtables of underlying utilities, specified by those public APIs.
There's a replacement printf implementation repeatedly looking for "%" & examining subsequent character(s) calling the core logic where appropriate.
1/1.5!