Notes
- This method is equivalent to the Lua
tostring()
function that can be called on Value objects too. - NULL strings Values are converted to the
"NULL"
Lua string
Value:tostring( ) method
Converts the C Value to a Lua string
Return value
Returns astring
representation of the C Value.
Example
local c = require "c"
-- Create a Value that contains a C integer value initialized to 125
local c_int = c.int(125)
print("C integer value = "..c_int:tostring())
-- Much simpler in this case:
-- Ue the concatenate operator, supported for Value objects
print("C integer value = "..c_int)