lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> But how can I handle different length of prefixes with directly
> following data... ?

Just change the logic to extract the prefixes. Perhaps something like this:

	local h =  handlers[line:sub(1,1)]
		or handlers[line:sub(1,2)]
		or handlers[line:sub(1,3)]
		or badprefix