shaKY-iota / type-challenges

Collection of TypeScript type challenges with online judge
https://tsch.js.org/
MIT License
0 stars 0 forks source link

2070 - DropChar #32

Open shaKY-iota opened 2 years ago

shaKY-iota commented 2 years ago
// your answers
type DropChar<S extends string, C extends string> = S extends `${infer First}${infer Rest}` ? `${First extends C ? "" : First}${DropChar<Rest, C>}` : "";