import { type SplitAt } from "https://deno.land/x/rimbu@0.13.5/typical/str.ts";
Returns false if the given string does not contain the given Middle
type,
or a 3-tuple containing the start, the matched middle, and the rest.
Examples
Example 1
Example 1
SplitAt<'abcd', 'bc'> => ['a', 'bc', 'd']
SplitAt<'abcd', 'ef'> => false
SplitAt<'abcd', 'b' | 'c'> => ['a', 'b', 'cd'] | ['ab', 'c', 'd']
Type Parameters
Middle extends string & NonEmptyString<Middle>