Typescript Remove Last Character From String