View source for Module:StringBuilder
From Melvor Idle
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local StringBuilder = {}
StringBuilder.__index = StringBuilder
-- Constructor
function StringBuilder.new()
local self = setmetatable({}, StringBuilder)
self.buffer = {}
return self
end
-- Append method
function StringBuilder:append(value)
if value then
table.insert(self.buffer, tostring(value))
end
return self
end
function StringBuilder:appendLine(value)
000
1:0
Template used on this page:
Return to Module:StringBuilder.