Replaces the last occurrence of from with to.
from
to
String replaceLast(String from, String to) { final i = lastIndexOf(from); if (i == -1) return this; return replaceRange(i, i + from.length, to); }