removeWrapIn()

Wrapper.prototype.removeWrapIn()

Returns given text without the opening and closing chars of the Wrapper object.

wrapper.class.ts
public removeWrapIn(text: string): string {
  return (
    (text = this.replaceClosingIn(text, '')),
    (text = this.replaceOpeningIn(text, '')),
    text
  );
}

Parameters

text: string

The text of a string type to unwrap from the opening and closing chars of the Wrapper object.

Returns

The return value is the text of string type unwrapped from the opening and closing chars of the Wrapper object.

Example usage

Last updated

Was this helpful?