Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/frugal/doc/dep/marked.ts>helpers.rtrim

A frugal web framework
Latest
function helpers.rtrim
import { helpers } from "https://deno.land/x/frugal@0.9.6/doc/dep/marked.ts";
const { rtrim } = helpers;

Remove trailing 'c's. Equivalent to str.replace(/c$/, ''). /c$/ is vulnerable to REDOS.

Parameters

str: string
c: string
optional
invert: boolean

Remove suffix of non-c chars instead. Default falsey.

Returns

string