Returns the string that replaced the first occurrence in the given text
Optional
the text to inspect
the string or regex to match
the expected replacement string
the string that replaced the first occurrence in the given text
replaceFirst(undefined, undefined, undefined); // undefinedreplaceFirst('foobar-foobar', 'foobar', undefined); // 'foobar-foobar'replaceFirst('foobar-foobar', 'foobar', 'hello'); // 'hello-foobar' Copy
replaceFirst(undefined, undefined, undefined); // undefinedreplaceFirst('foobar-foobar', 'foobar', undefined); // 'foobar-foobar'replaceFirst('foobar-foobar', 'foobar', 'hello'); // 'hello-foobar'
Returns the string that replaced the first occurrence in the given text