splitByLastOccurrenceOf method
Implementation
List<String> splitByLastOccurrenceOf(String separator) {
final splitIndex = this.lastIndexOf(separator);
if (splitIndex == -1) {
return [this];
}
return [
this.substring(0, splitIndex),
this.substring(splitIndex + separator.length),
];
}