removeEnd method
Removes end
from the end of the string, if it exists.
Implementation
String removeEnd(String end) =>
// Check if the string ends with the target and remove it if so.
endsWith(end) ? substring(0, length - end.length) : this;