import { lines } from "https://deno.land/x/ayonli_jsext@v0.9.72/string/index.ts";
Splits the string into lines by \n
or \r\n
.
Examples
Example 1
Example 1
import { lines } from "@ayonli/jsext/string";
console.log(lines("hello\nworld")); // ["hello", "world"]
console.log(lines("hello\r\nworld")); // ["hello", "world"]