Hyperlinkv0.8.0-beta.28

String

String.linesWithSeparatorsconsteffect/String.ts:991
(s: string): LinesIterator

Returns an IterableIterator which yields each line contained within the string as well as the trailing newline character.

Example (Iterating lines with separators)

import { String } from "effect"

const lines = String.linesWithSeparators("hello\nworld\n")
console.log(Array.from(lines)) // ["hello\n", "world\n"]
splitting
Source effect/String.ts:9911 lines
export const linesWithSeparators = (s: string): LinesIterator => linesSeparated(s, false)
Referenced by 1 symbols