import { type Count } from "https://deno.land/x/rimbu@1.0.2/typical/str.ts";
Returns the amount of times the given Sub
type is encountered in the given string.
Examples
Example 1
Example 1
Count<'abcba', 'c'> => 1
Count<'abcba', 'a' | 'c'> => 3
Count<'abcba', 'q'> => 0
Type Parameters
Sub extends string & NonEmptyString<Sub>