How do I convert a lua string to a C char*?
snippet in lua

How do I convert a lua string to a C char*?

user8871

local text = "text"
local c_str = ffi.new("char[?]", #text)
ffi.copy(c_str, text)
lib.drawText(fb, px, py, c_str, color)