T x
To cast a Macaulay2 string to a foreign object with a string type, give the type followed by the string.
i1 : charstar "Hello, world!" o1 = Hello, world! o1 : ForeignObject of type char*
The source of this document is in ForeignFunctions.m2:1164:0.