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