string.trim(s) is deprecated. Removed some spaces tabulations
This commit is contained in:
parent
dab0c97bb6
commit
9eb136b734
@ -33,11 +33,17 @@ function string:split(sep)
|
||||
return fields
|
||||
end
|
||||
|
||||
-- Removes spaces
|
||||
-- DEPRECATED
|
||||
function string.trim(s)
|
||||
print("string.trim(s) is DEPRECATED use string:trim() instead")
|
||||
return s:gsub("^%s*(.-)%s*$", "%1")
|
||||
end
|
||||
|
||||
-- Removes spaces
|
||||
function string:trim()
|
||||
return self:gsub("^%s*(.-)%s*$", "%1")
|
||||
end
|
||||
|
||||
function get_http_file_name(url, headers)
|
||||
-- Everything after the last /
|
||||
local file_name = url:match("([^/]+)$")
|
||||
@ -153,6 +159,7 @@ function run_command(str)
|
||||
return result
|
||||
end
|
||||
|
||||
-- User has priviledges
|
||||
function is_sudo(msg)
|
||||
local var = false
|
||||
-- Check users id in config
|
||||
@ -220,7 +227,7 @@ end
|
||||
|
||||
-- DEPRECATED!!!!!
|
||||
function string.starts(String, Start)
|
||||
print "string.starts(String, Start) is DEPRECATED use string:starts(text) instead"
|
||||
print("string.starts(String, Start) is DEPRECATED use string:starts(text) instead")
|
||||
return Start == string.sub(String,1,string.len(Start))
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user