Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rimbu/typical/mod.ts>Str.Init

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

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, "">