- Documentation
- Reference manual
- Packages
- A C++ interface to SWI-Prolog
- A C++ interface to SWI-Prolog (Version 2)
- Overview of accessing and changing values (version 2)
- Converting PlTerm to native C and C++ types (version 2)
- Unification (version 2)
- Comparison (version 2)
- Analysing compound terms (version 2)
- Miscellaneous (version 2)
- The class PlTerm_string (version 2)
- The class PlCodeList (version 2)
- The class PlCharList (version 2)
- The class PlCompound (version 2)
- The class PlTail (version 2)
- The class PlTermv (version 2)
- The class PlAtom - Supporting Prolog constants (version 2)
- Classes for the recorded database: PlRecord and PlRecordExternalCopy
- Overview of accessing and changing values (version 2)
- A C++ interface to SWI-Prolog (Version 2)
- A C++ interface to SWI-Prolog
2.10.6 The class PlTerm_string (version 2)
A SWI-Prolog string represents a byte-string on the global stack. Its
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. However, it is generally
preferred to use blobs for storing arbitrary C-data structures (see also PlTerm_pointer(void
*ptr)
).
- PlTerm_string :: PlTerm_string(const wchar_t *text)
- PlTerm_string :: PlTerm_string(const char *text)
- Create a SWI-Prolog string object from a 0-terminated C-string. The text is copied.
- PlTerm_string :: PlTerm_string(const wchar_t *text, size_t len)
- PlTerm_string :: PlTerm_string(const char *text, size_t len)
- Create a SWI-Prolog string object from a C-string with specified length. The text may contain 0-characters and is copied.