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

    Function replaceFirstIgnoreCase

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

      Parameters

      • Optionaltext: null | string

        The text to inspect

      • Optionalsearch: null | string | RegExp

        The string or regex to match

      • Optionalreplace: null | string

        The expected replacement string

      Returns undefined | null | string

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

      David Hsing

      replaceFirstIgnoreCase(undefined, undefined, undefined);    // undefined
      replaceFirstIgnoreCase('foobar-foobar', 'foobar', undefined); // 'foobar-foobar'
      replaceFirstIgnoreCase('foobar-foobar', 'FOOBAR', 'hello'); // 'hello-foobar'