Closed yashi closed 11 months ago
Hello @yashi, as far as I remember this was done like this because there are some highly embedded toolchains that have a restricted usage of printf
-family, in fact, there are platforms where there are no printf
-family at all for code size/performance reasons.
I agree with using libc calls when possible, but this case is kind of special.
Is this critical for your use case? In that case, we can turn the approach into a macro-conditional section, where, if the end user ensures the existence of snprintf
by enabling some CMake flag, the library will use your proposal.
If this is not critical for your use case, we prefer to keep it as it is.
OK. Thanks. Closing.
We can simply use snprintf() to generate string representation of an integer value in a 7 bytes bufffer.