From Xojo Documentation
Creates a CString from a Text with a specific encoding. The CString is immutable and is its own entity with the lifetime not tied to the source text value. This is provided to make dealing with declares easier.
In general, CString is for use with Declare commands and MemoryBlocks.
- NilObjectException if encoding is Nil.
- UnsupportedFormatException if the text is cannot be represented in the given encoding. For example, Emoji is not representable in the ASCII encoding.
Convert text to CString: