Misc text utilities