Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/rimbu/typical/str.ts>Init

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
type alias Init
import { type Init } from "https://deno.land/x/rimbu@1.0.2/typical/str.ts";

Returns all but the last character of the given string, or false if the string is empty.

Examples

Example 1

Init<'abcd'> => 'abc'
Init<''> => false

Type Parameters

S extends string
definition: InitHelper<S, "">