castl icon indicating copy to clipboard operation
castl copied to clipboard

String.prototype.replace() without RegExp

Open sleirsgoevy opened this issue 7 years ago • 0 comments

The first argument of String.prototype.replace() is actually interpreted as a Lua search pattern, not as a string. For example, this code console.log("String.prototype.replace()".replace("$", " is buggy")) prints String.prototype.replace() is buggy, while it should just print String.prototype.replace().

sleirsgoevy avatar May 05 '17 17:05 sleirsgoevy