Created minimizeString function and added minimize flag to Swift render function.