effect-io-ai

Package: effect
Module: String

String.TrimStart

Type-level representation of trimming whitespace from the start of a string.

Example (Trimming leading whitespace at the type level)

import type { String } from "effect"

type Result = String.TrimStart<"  hello"> // "hello"

Signature

type TrimStart<A> = A extends `${" " | "\n" | "\t" | "\r"}${infer B}` ? TrimStart<B> : A

Source

Since v2.0.0