Remove char from the end of str, or whitespace if char isn't provided.
char
str
Optional
trimEnd('hello '); // 'hello'trimEnd('hello///', '/'); // 'hello' Copy
trimEnd('hello '); // 'hello'trimEnd('hello///', '/'); // 'hello'
Remove
charfrom the end ofstr, or whitespace ifcharisn't provided.