import { type ReplaceLast } from "https://deno.land/x/rimbu@1.0.2/typical/str.ts";
Replaces, in the given string, the last match with Sub with the given Repl. Returns never if there was no match.
Examples
Example 1
Example 1
ReplaceLast<'abcba', 'b', '_'> => 'abc_a'
ReplaceLast<'abcba', 'b' | 'c', '_'> => 'abc_a'