Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- read={
- lines=function(string)
- string=string:gsub('<br>','\n'):gsub('</br>','')
- local lines={}
- for line in string.gmatch(string,'[^\n]+') do
- table.insert(lines,line)
- end
- return lines
- end,
- }
- edit={
- line=function(string,line,oldValue,newValue)
- local lines = read.lines(string)
- local str = ""
- for _,value in pairs(lines) do
- if _ == line then
- str=str..value:gsub(oldValue,newValue).."\n"
- else
- str=str..value.."\n"
- end
- end
- return str
- end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement