Trimming zeros smartly