来源:https://stackoverflow.com/questions/19664666/check-if-a-string-isnt-nil-or-empty-in-lua
判断字符串是否为空
local function isempty(s)
return s == nil or s == ''
end
if isempty(foo) then
foo = "default value"
end
来源:https://stackoverflow.com/questions/19664666/check-if-a-string-isnt-nil-or-empty-in-lua
判断字符串是否为空
local function isempty(s)
return s == nil or s == ''
end
if isempty(foo) then
foo = "default value"
end