import { split } from "https://deno.land/x/fun@v2.0.0/string.ts";
Split a string into an array of strings at a character or RegExp match.
Examples
Example 1
Example 1
import { split } from "./string.ts";
import { pipe } from "./fn.ts";
const bySpace = split(" ");
const byWhitespace = split(/\s+/);
const str = "Hello There World";
const result1 = bySpace(str); // ["Hello", "", "There", "", "World"]
const result2 = byWhitespace(str); // ["Hello", "There", "World"]