Replace moves the top element into the given valid index without shifting any element (therefore replacing the value at the given index), and then pops the top element. http://www.lua.org/manual/5.2/manual.html#lua_replace
(index int)
| 603 | // |
| 604 | // http://www.lua.org/manual/5.2/manual.html#lua_replace |
| 605 | func (l *State) Replace(index int) { |
| 606 | l.checkElementCount(1) |
| 607 | l.move(index, l.stack[l.top-1]) |
| 608 | l.top-- |
| 609 | } |
| 610 | |
| 611 | // CheckStack ensures that there are at least size free stack slots in the |
| 612 | // stack. This call will not panic(), unlike the other Check*() functions. |
no test coverage detected