/ Published in: Lua
yields the interpreted value of a given string by prepending "return" and calling loadstring()
Expand |
Embed | Plain Text
local function exec( s ) return loadstring( 'return ' .. s )() end -- example: local v = exec '{ 42 }' print( v[ 1 ] ) -- prints "42"
You need to login to post a comment.
