-- 空字符串字面量
local some_empty_string = ""
-- 与 "" 比较,或检查长度
local is_empty = some_empty_string == ""
-- is_empty = true
local zero_length = #some_empty_string == 0
-- zero_length = true
-- 空格不算空
local spaces = " "
local spaces_empty = spaces == ""
-- spaces_empty = false
-- %S 是任意非空白字符
local spaces_blank = spaces:find("%S") == nil
-- spaces_blank = true
print("is_empty = " .. tostring(is_empty))
print("zero_length = " .. tostring(zero_length))
print("spaces_empty = " .. tostring(spaces_empty))
print("spaces_blank = " .. tostring(spaces_blank))