Added function to append strings with formatting.