replaceClosingIn()

Wrapper.prototype.replaceClosingIn()

Replaces the closing chars of the Wrapper object in the given text with a given replacement value.

The replacement succeeds if the closing characters exist at the end of the text.

wrapper.class.ts
public replaceClosingIn(text: string, replaceValue: string): string {
  return Wrapper.replaceClosing(text, this.closing, replaceValue);
}

Parameters

text: string

The text of string type in which the closing chars are replaced by given replacement value.

replaceValue: string

The value of string type as a replacement for the closing chars at the end of the given text.

Returns

The return value is the given text of string type with replaced closing chars by given replacement value.

Example usage

Last updated

Was this helpful?