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

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

Skips part of the string as long as its parts match Sub.

Examples

Example 1

DropWhile<'aabc', 'a'> => 'bc'
DropWhile<'aabc', 'a' | 'b'> => 'c'
DropWhile<'aabc', 'q'> => 'aabc'

Type Parameters

S extends string
Sub extends string
definition: S extends Append<Sub, infer Rest> ? DropWhile<Rest, Sub> : S