String.ToText
From Xojo Documentation
Method
Converts the String to a Text value provided there is a valid encoding on the String.
Notes
If the String does not have a valid encoding (such as it is Nil) then a Xojo.Core.BadDataException is raised. You can define an encoding for the String using DefineEncoding.
Sample Code
Convert a String to Text:
Append an EndOfLine (which is a String) to a Text:
See Also
Text data type