Skip to content

trimStart

ts
function String.trimStart<T extends string>(
    target: T,
): TrimStart<T>

Removes whitespace from the start of target string.

Example

ts
import { String } from "@monstermann/string";

String.trimStart("  hello world  "); // "hello world  "
ts
import { String } from "@monstermann/string";

pipe("  hello world  ", String.trimStart()); // "hello world  "