diff --git a/bot/utils.lua b/bot/utils.lua index 506727b..d922a23 100644 --- a/bot/utils.lua +++ b/bot/utils.lua @@ -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"