Removes given characters from the end of the string. See also: trim and trimStart.
trimEnd("abcxzyz", "yz"); // "abcxz"trimEnd("!aaa!!", "!"); // "!aaa" Copy
trimEnd("abcxzyz", "yz"); // "abcxz"trimEnd("!aaa!!", "!"); // "!aaa"
Source string.
Characters to remove, taken as a whole.
Removes given characters from the end of the string. See also: trim and trimStart.
Example