Appearance
题目
Drop the specified chars from a string.
For example:
type Butterfly = DropString<"foobar!", "fb">; // 'ooar!'
解答
type DropString<S, R> = S extends `${infer x}${infer xs}` ? R extends `${any}${x}${any}` ? DropString<xs, R> : `${x}${DropString<xs, R>}` : "";