-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d7ad8c
commit ba0601e
Showing
37 changed files
with
190 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,31 @@ | ||
interface String { | ||
/** | ||
* Replace all instances of a substring in a string, using a regular expression or search string. | ||
* @param searchValue A string to search for. | ||
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. | ||
* Replaces all occurrences of substrings that match a search string or a regular expression. | ||
* A `TypeError` will be thrown if a RegExp without a `g` (global) flag is used. | ||
* @param searchValue A string or RegExp search value. | ||
* @param replaceValue The replacement text. | ||
*/ | ||
replaceAll(searchValue: string | RegExp, replaceValue: string): string; | ||
|
||
/** | ||
* Replace all instances of a substring in a string, using a regular expression or search string. | ||
* @param searchValue A string to search for. | ||
* Replaces all occurrences of substrings that match a search string or a regular expression. | ||
* A `TypeError` will be thrown if a RegExp without a `g` (global) flag is used. | ||
* @param searchValue A string or RegExp search value. | ||
* @param replacer A function that returns the replacement text. | ||
*/ | ||
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; | ||
|
||
/** | ||
* Replaces all occurrences of substrings that match the method provided by `searchValue`. | ||
* @param searchValue An object that supports searching for and replacing matches within a string. | ||
* @param replaceValue The replacement text. | ||
*/ | ||
replaceAll(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; | ||
|
||
/** | ||
* Replaces all occurrences of substrings that match the method provided by `searchValue`. | ||
* @param searchValue An object that supports searching for and replacing matches within a string. | ||
* @param replacer A function that returns the replacement text. | ||
*/ | ||
replaceAll(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.