[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Feature request: plain option for gsub
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 22 Aug 2014 10:47:47 -0300
> I have a feature request for Lua: please add an additional plain
> option to gsub which defaults to false. If it is true, it should make
> gsub behave like replace() in JavaScript (replace without any pattern
> matching).
>
> [...]
>
> For something like a basic replace() function without patterns (those
> obviously can't be used on user-provided strings without escaping
> hassle), the provided built-in solution should be better.
Are you aware that the example you gave (replace() in JavaScript) also
cannot be used on user-provided strings without escaping hassle?
(I could not resist...)
-- Roberto