-
-
Notifications
You must be signed in to change notification settings - Fork 3
fmt_plusminus.3
Manvendra Bhangui edited this page Feb 25, 2024
·
4 revisions
fmt_plusminus - write '+' or '-'
#include <fmt.h>
unsigned int fmt_plusminus(char *dest,signed int source);
fmt_plusminus writes '-' to dest if source is negative, '+' if source is positive, nothing otherwise. It returns the number of bytes written.
fmt_plusminus does not append \0.
If dest equals FMT_LEN (i.e. is zero), fmt_plusminus returns the number of bytes it would have written.