@@ -15,14 +15,18 @@ end; beginswith = function(str,pfx) if #str < #pfx then return false end - return string.sub(str,1,#pfx) == pfx + if string.sub(str,1,#pfx) == pfx then + return true, string.sub(str,1 + #pfx) + end end; endswith = function(str,sfx) if #str < #sfx then return false end - return string.sub(str,#sfx) == sfx + if string.sub(str,#sfx) == sfx then + return true, string.sub(str,1,#sfx) + end end; explode = function(str,delim,pat) -- this is messy as fuck but it works so im keeping it local i = 1