lastRightPart function

String lastRightPart(
  1. String strVal,
  2. String needle
)

Implementation

String lastRightPart(String strVal, String needle) {
  var pos = strVal.lastIndexOf(needle);
  return pos == -1 ? strVal : strVal.substring(pos + needle.length);
}