lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 19 May 2013 06:23, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> Version 0.2 adds support for calling string methods on Buffers by
>> prefixing the name with "s_". For example, `bufflib.s_gsub(buff, ...)`
>> and `buff:s_gsub(...)` are both equivalent to `str:gsub(...)` (where
>> `buff` is a Buffer and `str` is the Buffer's contents as a string).
>
> Why the need for the "s_" prefix?
>

Just to ensure that there are no name conflicts between string methods
and Buffer methods.