Typescript Remove Last Char From String