Function removeAllIgnoreCase

  • Returns the string that removed all occurrences in the given text, case-insensitive

    Parameters

    • Optionaltext: null | string

      the text to inspect

    • Optionalsearch: null | string | RegExp

      the string or regex to match

    Returns string | undefined | null

    the string that removed all occurrences in the given text, case-insensitive

    removeAllIgnoreCase(undefined, undefined);    // undefined
    removeAllIgnoreCase('foobar-foobar', undefined); // 'foobar-foobar'
    removeAllIgnoreCase('foobar-foobar', 'BAR'); // 'foo-foo'