split() function
구분자로 문자열을 분할합니다.
Signature:
typescript
declare function split(
sep: string,
iterable: Iterable<string>,
): IterableIterator<string>;Example
ts
const iter = split(",", "1,2,3,4");
iter.next(); // 1
iter.next(); // 2
iter.next(); // 3
iter.next(); // 4
iter.next(); // undefined
// with pipe
pipe("1,2,3,4,5", split(","), toArray); // ["1", "2", "3", "4", "5"]