RosettaCodeData/Task/String-append/Lua/string-append-1.lua

13 lines
145 B
Lua

function string:show ()
print(self)
end
function string:append (s)
self = self .. s
end
x = "Hi "
x:show()
x:append("there!")
x:show()