"%#s"?
Richard A. O'Keefe
ok at quintus.UUCP
Tue May 31 15:38:43 AEST 1988
In article <19166 at watmath.waterloo.edu>, rbutterworth at watmath.waterloo.edu (Ray Butterworth) writes:
> Perhaps %#s and %#c can be added in future updates to the language.
In the mean-time, why not post sources for a
spr_str(char *buffer, int width, int places, char *source)
function equivalent to
sprintf(buffer, "%#*.*s", width, places, source)
so that we can try the idea out? I suggest width < 0 means the equivalent
of "%#.*s" and places < 0 means the equivalent of "%#*s".
{spr_str(buf, width, 1, &c) can serve for sprintf(buf, "%#*c", width, c).}
When we have some prior art going, we can ask for it to be added to printf.
More information about the Comp.lang.c
mailing list