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

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

Returns true if the given string does not contain the given Amount (default 1) of Sub types.

Examples

Example 1

NotContains<'abcba', 'b'> => false
NotContains<'abcba', 'b', 2> => false
NotContains<'abcba', 'b', 3> => true
NotContains<'abcba', 'q'> => true

Type Parameters

S extends string
Sub extends string & NonEmptyString<Sub>
optional
Amount extends number = 1
definition: Contains<S, Sub, Amount> extends false ? true : false