local function startswith(str, start)
return str:sub(1, #start) == start
end
local function endswith(str, ending)
return ending == "" or str:sub(-#ending) == ending
end
local test_html = "script>console.log("ok")</script>"
if starts_with(test_html, ’<script>’) and ends_with(test_html, ’</script>’) then
print("ok")
end