Typescript Remove Last N Characters From String