Difference between revisions of "String.dump"

From OpenEUO
Jump to: navigation, search
m
 
Line 3: Line 3:
 
Returns a string containing a binary representation of the given function, so that a later loadstring on this string returns a copy of the function. Said function must be a Lua function without upvalues. (A local variable used by an inner function is called an upvalue, or external local variable, inside the inner function).  The returned string may include embedded nulls or other unprintable characters.
 
Returns a string containing a binary representation of the given function, so that a later loadstring on this string returns a copy of the function. Said function must be a Lua function without upvalues. (A local variable used by an inner function is called an upvalue, or external local variable, inside the inner function).  The returned string may include embedded nulls or other unprintable characters.
  
'''''This function is disabled in luaJIT-based lua implementations...'''''
+
'''''This function will likely return an error string in luaJIT-based lua implementations...'''''
  
 
[[getmetatable]]
 
[[getmetatable]]

Latest revision as of 15:32, 20 October 2010

string.dump (function)

Returns a string containing a binary representation of the given function, so that a later loadstring on this string returns a copy of the function. Said function must be a Lua function without upvalues. (A local variable used by an inner function is called an upvalue, or external local variable, inside the inner function). The returned string may include embedded nulls or other unprintable characters.

This function will likely return an error string in luaJIT-based lua implementations...

getmetatable

String.byte

String.len

Lua Manual - Length Operator (#)