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

13 lines
145 B
Lua
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
function string:show ()
print(self)
end
function string:append (s)
self = self .. s
end
x = "Hi "
x:show()
x:append("there!")
x:show()