-- string stm_string(Stream S, int len)
-- @S - Stream object to read from
-- @len - Length of string being read

local function stm_string(S, len)
	local pos = S.index + len
	local str = string.sub(S.source, S.index, pos - 1)

	S.index = pos
	return str
end
