Skip to main content
Module

x/fun/string.ts>trimStart

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function trimStart
import { trimStart } from "https://deno.land/x/fun@v2.0.0/string.ts";

Trims whitespace from the beginning of a string.

Examples

Example 1

import { trimStart } from "./string.ts";

const result1 = trimStart("Hello World"); // "Hello World"
const result2 = trimStart("  Hello World"); // "Hello World"
const result3 = trimStart("Hello World  "); // "Hello World"
const result4 = trimStart(" Hello World "); // "Hello World"

Parameters

a: string

Returns

string