All pastes #16233 Raw Edit

Legorol

public text v1 · immutable
#16233 ·published 2005-06-29 01:35 UTC
rendered paste body
function split2(arg, tab)
	local s;
	local t, count = tab, 1;
	if ( not t ) then
		t = {};
	else
		for count = 1, table.getn(t) do
			t[count] = nil;
		end;
		table.setn(t, 0);
	end
	for s in mygfind(arg, "[^.]+") do
			t[count] = s;
			table.setn(t, count);
			count = count + 1;
	end
	return t;
end