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

x/rimbu/typical/str.ts>First

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

Returns the first character of the given string, or false if the string is empty.

Examples

Example 1

First<'abc'> => 'a'
First<''> => false

Type Parameters

S extends string
definition: S extends Append<infer First, string> ? First : false