What’s the longest named *printf
function? Amongst the GNU libraries it appears to be xvasprintf.
x |
aborts on allocation failure | |||
v |
takes va_list of arguments | |||
a |
allocates space for return string | |||
s |
prints to a string | |||
print f ormatted |
It’s a shame, as Eric suggests in this email, that we don’t have xvasnprintf
.
*sigh*
*printf and *scanf naming conventions solve a problem that hasn’t really existed since at least the 1980s: getting the most meaningful information into the fewest possible function-name letters. C++ iostreams would have solved this problem, if they weren’t C++ (which, in comparison, make COBOL seem terse and APL seem legible to the casual reader). Java, of course, had to do C++ one better.
iostreams mainly suck because they can’t be internationalized, whereas at least with *printf you can write: