Lua 関数の ClassExists は、指定された文字列がクラスであるかどうかを示すブール値を返します。
この例では、"Display" という単語がクラスであるかどうかを尋ね、適切なフィードバックを返します。
return function()
-- Store a string with the class name
local className = "Display"
-- Check if the class exists and then provide proper feedback
if ClassExists(className) then
Printf("The class '%s' exists", className)
else
Printf("The class '%s' does not exists", className)
end
end