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

x/ayonli_jsext/string/index.ts>trimEnd

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

Removes trailing spaces or custom characters of the string.

Examples

Example 1

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

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

Parameters

str: string
optional
chars = [UNSUPPORTED]

Returns

string