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.Filter

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

Returns a string containing all the elements that match the given Sub type.

Examples

Example 1

Filter<'abcd', 'b'> => 'b'
Filter<'abcd', 'b' | 'd'> => 'bd'

Type Parameters

S extends string
Sub extends string & NonEmptyString<Sub>
definition: FilterHelper<S, Sub, "">