Skip to main content
Module

x/fun/string.ts>slice

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function slice
import { slice } from "https://deno.land/x/fun@v2.0.0/string.ts";

Create a substring of a string based on 0 based indices.

Examples

Example 1

import { slice } from "./string.ts";

const slc = slice(1, 5);

const result1 = slc(""); // ""
const result2 = slc("Hello"); "ello"
const result3 = slc("e");

Parameters

start: number
end: number