Enhanced printf-like formatting