import { type Str } from "https://deno.land/x/rimbu@1.1.0/typical/index.ts";
const { ReplaceFirst } = Str;
Replaces, in the given string, the first match with Sub with the given Repl. Returns never if there was no match.
Examples
Example 1
Example 1
ReplaceFirst<'abcba', 'b', '_'> => 'a_cba'
ReplaceFirst<'abcba', 'b' | 'c', '_'> => 'a_cba'