Skip to content

@technobuddha > library > String > Operations

Function: cleanEnd()

ts
function cleanEnd(input: string, characters: 
  | string
  | RegExp
  | (
  | string
  | RegExp)[]): string;

Defined in: clean-end.ts:14

Remove all occurrences of characters from the end of the string

Parameters

ParameterTypeDefault valueDescription
inputstringundefinedThe string
characters| string | RegExp | ( | string | RegExp)[]trimEquivalentthe characters(s) to remove

Returns

string