Trim string function

This commit is contained in:
yago 2015-01-31 16:46:30 +01:00
parent 6d388060c7
commit 737738a330

View File

@ -31,6 +31,11 @@ function string:split(sep)
return fields
end
-- Removes spaces
function string.trim(s)
return s:gsub("^%s*(.-)%s*$", "%1")
end
function download_to_file( url , noremove )
print("url to download: "..url)
local ltn12 = require "ltn12"