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

13 lines
145 B
Lua
Raw Normal View History

2023-07-01 11:58:00 -04:00
function string:show ()
print(self)
end
function string:append (s)
self = self .. s
end
x = "Hi "
x:show()
x:append("there!")
x:show()