removeLast: removes the last occurrence of a substring
String removeLast(String subString) => this?.replaceFirst(subString, "") ?? "";