The original string to trim.
The substring to remove from the end of the input string.
The trimmed string with the target removed from the end, if it was present.
Removes up to a specified number of occurrences of a target substring from the end of the input string.
The original string to trim.
The substring to remove from the end of the input.
The maximum number of times to remove the target substring.
The trimmed string with up to max
occurrences of target
removed from the end.
Removes all occurrences of the specified target substrings from the end of the input string.
The original string to trim.
An array of substrings to remove from the end of the input string.
The trimmed string with all specified target substrings removed from the end.
Removes specified target substrings from the end of the input string.
The string to trim.
An array of substrings to remove from the end of the input.
If true, repeatedly trims all occurrences of the target substrings from the end; if false, trims only one occurrence.
The trimmed string.
Removes the specified target substring from the end of the input string, if present.