lua-users home
lua-l archive

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


> It seems that the behavior of string.gsub changed from 5.2 to 5.3. In
> 5.1 and 5.2 the
> 
>   arr = split(bigstr, "([^\n]*)\n?")
> 
> would always generate an sequence with an empty string at its end, and
> table.remove would delete it.
> 
> I remember ___veeeery___ vaguely a discussion here in the list about a
> change in string.gsub that made it stop substituting the empty sting
> at the end, but I'm not being able to find it now... anyone has a
> pointer to it?

- http://lua-users.org/lists/lua-l/2013-04/msg00812.html
- http://lua-users.org/lists/lua-l/2016-05/msg00198.html

See also commit 783aa8a9da5f3.

-- Roberto