All pastes #215085 Raw Edit

daurn

public text v1 · immutable
#215085 ·published 2006-10-22 11:25 UTC
rendered paste body
-- Converts a string to a table.
function ltot(str,pattern)
	local tbl = {}
	local i = 1
	local e = 0
	local p = 0
	local place = ""
	while true do
		place = e
		p, e = string.find(str,pattern,e+1)
		if e == nil then break end
		tbl[i] = string.sub(str,place+1,p-1)
		i = i + 1
	end
	return tbl
end