"%#s"?

Joe Keane jk3k+ at andrew.cmu.edu
Sat May 28 08:32:10 AEST 1988


It would be nice for printf et al.  to have a %#s format specifier,
to convert unprintable characters into backslash escapes.  Thus
	printf ("%#s", "\b\fhi\n\207");
would be equivalent to
	printf ("\\b\\fhi\\n\\207");
Has anyone else thought of this?  Is it a good idea?  Can it be put
in the standard?

--Joe



More information about the Comp.lang.c mailing list