I'm not massively enthusiastic about these formatting functions, but I can't think of anything better offhand.