mirror of
https://github.com/type-challenges/type-challenges.git
synced 2026-02-01 15:47:22 +00:00
StartsWith

by jiangshan @jiangshanmeta
Implement StartsWith<T, U> which takes two exact string types and returns whether T starts with U
For example
type a = StartsWith<'abc', 'ac'> // expected to be false
type b = StartsWith<'abc', 'ab'> // expected to be true
type c = StartsWith<'abc', 'abcd'> // expected to be false