local returnN = function(n, str) if n == 0 then return "" else return string.sub(str, -n) end endprint(returnN(0, "abc"))print(returnN(1, "abc"))
Standard input is empty
c
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!