Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 1.84 KB

File metadata and controls

13 lines (9 loc) · 1.84 KB

EndsWith 中等 #template-literal

by jiangshan @jiangshanmeta

接受挑战    English

实现EndsWith<T, U>,接收两个string类型参数,然后判断T是否以U结尾,根据结果返回truefalse

例如:

type a = EndsWith<'abc', 'bc'> // expected to be true
type b = EndsWith<'abc', 'abc'> // expected to be true
type c = EndsWith<'abc', 'd'> // expected to be false

返回首页 分享你的解答 查看解答

相关挑战

2688・StartsWith