@newdash/newdash
Version:
javascript/typescript utility library
23 lines (22 loc) • 579 B
TypeScript
/**
* Replaces matches for `pattern` in `string` with `replacement`.
*
* **Note:** This method is based on
* [`String#replace`](https://mdn.io/String/replace).
*
* @since 5.8.0
* @category String
* @param string The string to modify.
* @param pattern The pattern to replace.
* @param replacement The match replacement.
* @returns Returns the modified string.
* @see [[truncate]], [[trim]]
* @example
*
* ```js
* replace('Hi Fred', 'Fred', 'Barney')
* // => 'Hi Barney'
* ```
*/
export declare function replace(...args: any[]): string;
export default replace;