Value concatenation
Value concatenation allow to convert the C Value to a string then concatenates it with another string or C Value.
The result of the concatenation is a string.
Example
--! luart-extensions
import c
-- load advapi32.dll library
local kernel32 = c.Library("kernel32.dll")
-- declare a prototype for GetCurrentDirectoryA() C function
kernel32.GetCurrentDirectoryA = "(IZ)I"
-- creates a C string of 255 characters length
local dir = c.string(255)
-- Get the current user name
if kernel32.GetCurrentDirectoryA(255, dir) then
-- concatenate the dir Value with a string
print("Current user name is "..dir)
else
error("Error while getting user name : "..sys.error)
end