Wie dump lua-Funktion chunk string?

How to dump lua-Funktion chunk string ?

function test(a, b)
  local c = a + b
  return c
end

print( type(test) )  --> function
print( test )         --> function: 0053B108
print( dumpToString(test) )

Wünsche ich dumpToString Ergebnis ist Folgendes:

function test(a, b)
  local c = a + b
  return c
end

Wie dies zu tun ?

=== update1 ===

Ich möchte die automatische Anmeldung und einfügen von code.

InformationsquelleAutor Flash | 2013-02-06
Schreibe einen Kommentar