Skip to main content
Module

x/gfm/mod.ts>Marked.helpers.rtrim

Server-side GitHub Flavored Markdown rendering for Deno
Go to Latest
function Marked.helpers.rtrim
import { Marked } from "https://deno.land/x/gfm@0.4.0/mod.ts";
const { rtrim } = Marked.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