You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libraries/node-core-library/src/Text.ts
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -97,14 +97,21 @@ function* readLinesFromChunk(
97
97
*/
98
98
exportclassText{
99
99
/**
100
-
* Returns the same thing as targetString.replace(searchValue, replaceValue), except that
101
-
* all matches are replaced, rather than just the first match.
100
+
* Replaces every occurrence of `searchValue` with `replaceValue`.
101
+
*
102
+
* @remarks
103
+
* This method has the same behavior as {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll | String.prototype.replaceAll}.
104
+
* In particular, if `searchValue` is an empty string, `replaceValue` is inserted before the first
105
+
* UTF-16 code unit, between each code unit, and after the last code unit.
106
+
*
102
107
* @param input - The string to be modified
103
108
* @param searchValue - The value to search for
104
109
* @param replaceValue - The replacement text
110
+
*
111
+
* @deprecated Use `String.prototype.replaceAll()` instead.
0 commit comments