Function removeEndIgnoreCase

  • Returns the string that removed the rightmost given string, case-insensitive

    Parameters

    • Optionaltext: null | string

      the text to inspect

    • Optionalremove: null | string

      the string to remove, case-insensitive

    Returns string | undefined | null

    the string that removed the rightmost given string, case-insensitive

    removeEndIgnoreCase('foobar', 'Hello');    // 'foobar'
    removeEndIgnoreCase('foobar', 'Bar'); // 'foo'