lua 根据函数名字符串来执行函数

function myfunction(msg)
    print("this is msg fun " .. msg);
end

local fun =_G["myfunction"];
if fun then
    fun("is ok");
end
原文地址:https://www.cnblogs.com/emyueguang/p/3716308.html