import { lines } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/string/index.js";
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"]