Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/mod.ts>string.slice

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

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