#include <sicstus/sicstus.h> int SP_get_list_n_codes(SP_term_ref term, SP_term_ref tail, size_t n, size_t *w, char *s);
s the encoded string representing the
character codes in the initial elements of list
that at most
n bytes are used. The number of bytes actually
written is assigned to
tail is set to the remainder
of the list. The array
s must have room for at least
Please note: The array
s is never
NUL-terminated. Any zero character codes in the list
term will be converted to the overlong UTF-8 sequence
Zero if the conversion fails (as far as failure can be detected), and a nonzero value otherwise.
Accessing Prolog Terms.