substringBeforeLast method

String substringBeforeLast(
  1. String separator
)

Implementation

String substringBeforeLast(String separator) {
  final index = lastIndexOf(separator);
  return substring(0, index);
}