I've found this useful so I'm presenting it here purely as a convenient hack...

Disadvantages are that it would be easy to overflow the _str[] buffer, but I've kept it small to save space (it's easy enough to make it bigger). Also that the vfprintf() library uses quite a lot of memory, but for smaller sketches there may be times when it's worth the trade-off.

Flames to /dev/null, as we used to say.... ;-)

Docs for printf/sprintf/vfprintf are here: http://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html#ga3b98c0d17b35642c0f3e4649092b9f1

Oh man, I am not sure that information will be a help or hindrance to those not already familiar with sprintf and the murky consequences of buffer overflow.

It's worth re-emphasizing that its really easy to overflow the buffer, the compiler gives absolutely no warning of this and the runtime consequences are difficult to predict. Its about the worst thing that can happen if you are trying to debug code that isn't working.

Unless one enjoys living dangeriously, or is in full command of how the sprintf arguments will be expanded, my advice is to spend a few extra seconds typing those compound Serial.print statements

The library is big, the syntax is obscure (especially compared to the core Arduino API), the syntax is different from the equivalent functionality in Processing, and it could be tough to implement properly in a memory-constrained environment (e.g. what do you we do if we don't have enough space for a buffer big enough to hold everything someone wants to print). Plus, the existing Serial API can do pretty much anything printf() can, it just takes a bit more text. I like the idea of making printf() easy for advanced users to hack into their code, but I'm wary of including it in the API.

You call it "writeln()" and use "Serial.println()", wouldn't it be more appropriate to call "Serial.print()" and put in the '\n' yourself ... if, where, and when you want it?

Buffer overflow considerations aside, I want it for formating stuff to LCD displays, where a 20-40 byte buffer is all I need and if I ain't payin attenshun to my line size I deserve whatever I get!!!!!