TrimEnd trims any whitespace or the selected characters from the end of the string
[string]
(string): input string[chars=' ']
(string): characters to remove from end of the string
(string): string with the characters removed from end of the string
const result = strings.trimEnd('-_-abc-_-', '_-');
console.log(result);
> '-_-abc'