public static string ReplaceLastOccurrence([NotNull] this string s, [NotNull] string what, [NotNull] string replacement) {
var place = s.LastIndexOf(what, StringComparison.Ordinal);
return place == -1 ? s : s.Remove(place, what.Length).Insert(place, replacement);
}