@unikue/ts-lang-utils
    Preparing search index...

    Function removeFirstIgnoreCase

    • Returns the string that removed the first occurrence in the given text, case-insensitive

      Parameters

      • Optionaltext: string | null

        The text to inspect

      • Optionalsearch: string | RegExp | null

        The string or regex to match

      Returns string | null | undefined

      the string that removed the first occurrence in the given text, case-insensitive

      David Hsing

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