Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/esm/string/index.js>trimStart

A JavaScript extension package for building strong and modern applications.
Latest
function trimStart
import { trimStart } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/string/index.js";

Removes leading spaces or custom characters of the string.

Examples

Example 1

import { trimStart } from "@ayonli/jsext/string";

console.log(trimStart("  hello world  ")); // "hello world  "
console.log(trimStart("  !hello world!  ", " !")); // "hello world!  "

Parameters

str
optional
chars = [UNSUPPORTED]