Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 1.61 KB

File metadata and controls

14 lines (9 loc) · 1.61 KB

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