Type Alias Split<Subject, Seperator>

Split a string into substrings using the specified separator, and return them as an array.

type R = StringPlus.Split<'abc', ''> // ['a', 'b', 'c']
type R = StringPlus.Split<'abc', 'a'> // ['', 'bc']
type R = StringPlus.Split<'abc', 'b'> // ['a', 'c']
type R = StringPlus.Split<'abc', 'c'> // ['ab', '']

Type Parameters

  • Subject extends string
  • Seperator extends string