function Util.TrimString(Y)local p,r=string.find(Y,"\094\037\115\042")return r==#Y and""or string.match(Y,"\046\042\037\083",r+1)end

function Util.TrimString(str)
	local _, from = string.find(str, "^%s*")
	-- trim the string in two steps to prevent quadratic backtracking when no "%S" match is found
	return from == #str and "" or string.match(str, ".*%S", from + 1)
end
