local util = require("tools.util")
local scret = {}
scret.__index = scret
function scret:process()
local words = util.split(self.scret, "%S+")
self.scret = words[1]
if words[2]:sub(1,1) == "*" then
self.scret = self.scret .. " "
end
while words[2]:sub(1,1) == "*" do
words[2] = words[2]:sub(2)
self.scret = self.scret .. "*"
end
end
function scret:add()
self:process()
return self.scret
end
function scret:new(obj, line)
obj = obj or { }
setmetatable(obj, self)
self.__index = self
self.scret = line
return obj
end
return scret