type-challenges/questions/02688-medium-startswith

StartsWith medium #template-literal

by jiangshan @jiangshanmeta

Take the Challenge    简体中文

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

Back Share your Solutions Check out Solutions

Related Challenges

2693・EndsWith