Hyperlinkv0.8.0-beta.28

String

String.linesIteratorconsteffect/String.ts:973
(self: string): LinesIterator

Returns an IterableIterator which yields each line contained within the string, trimming off the trailing newline character.

Example (Iterating lines without separators)

import { String } from "effect"

const lines = String.linesIterator("hello\nworld\n")
console.log(Array.from(lines)) // ["hello", "world"]
splitting
Source effect/String.ts:9731 lines
export const linesIterator = (self: string): LinesIterator => linesSeparated(self, true)