text: Make format more generic.
io: Add writef and writefln.