Exit Trim Function