Function strUnwrap

  • Removes the specified left and right substrings from the input string.

    Parameters

    • input: string

      The input string from which to remove the substrings.

    • left: string

      The left substring to remove.

    • right: string

      The right substring to remove.

    • flags: string = ''

      The flags for the RegExp. Default is an empty string.

    Returns string

    Example

    const input = 'Hello World';
    const left = 'Hello ';
    const right = ' World';
    strUnwrap(input, left, right);
    //=> 'World'

Generated using TypeDoc