52. implement Split<S, D>
Share
- accepted / - tried
Just like String.prototype.split()
, please implement Split<S, D>
.
type A = Split<'BFE.dev', '.'> // ['BFE', 'dev']type B = Split<'bfe.dev', 'e'> // ['bf', '.d', 'v']type C = Split<'bfe.bfe.bfe', 'bfe'> // ['', '.', '.', '']