import { type TakeWhile } from "https://deno.land/x/rimbu@1.1.0/typical/str.ts";
Returns part of the string as long as its parts match Sub.
Examples
Example 1
Example 1
TakeWhile<'aabc', 'a'> => 'aa'
TakeWhile<'aabc', 'a' | 'b'> => 'aab'
TakeWhile<'aabc', 'q'> => ''
Type Parameters
Sub extends string & NonEmptyString<Sub>