A SWI-Prolog string represents a byte-string on the global stack.
It's lifetime is the same as for compound terms and other data living on the global stack.
Strings are not only a compound representation of text that is garbage-collected,
but as they can contain 0-bytes, they can be used to contain arbitrary C-data structures.

C# | Visual Basic | Visual C++ | F# |
public static PlTerm PlString( string text, int len )
Public Shared Function PlString ( text As String, len As Integer ) As PlTerm
public: static PlTerm PlString( String^ text, int len )
static member PlString : text : string * len : int -> PlTerm

PlTerm
a new PlTerm
a new PlTerm
Assembly: SwiPlCs (Module: SwiPlCs.dll) Version: 1.1.60601.0 (1.1.60601.0)