(+String,
?Before, ?Length, ?After, ?SubString)This predicate is functionally equivalent to sub_atom/5,
but operates on strings. Note that this implies the string input
arguments can be either strings or atoms. If SubString is
unbound (output) it is unified with a string. The following example
splits a string of the form
<name>=<value> into the name part (an
atom) and the value (a string).
atomics_to_string(+List,
-String) List is a list of strings, atoms, or number types. Succeeds
if String can be unified with the concatenated elements of List.
Equivalent to
atomics_to_string(+List,
+Separator, -String) Creates a string just like atomics_to_string/2,
but inserts
Separator between each pair of inputs. For example:
string_upper(+String,
-UpperCase) Convert String to upper case and unify the result with
UpperCase.
string_lower(+String,
LowerCase) Convert String to lower case and unify the result with
LowerCase.
read_string(+Stream,
?Length, -String) Read at most Length characters from Stream and
return them in the string String. If Length is
unbound, Stream is read to the end and Length is
unified with the number of characters read.
read_string(+Stream,
+SepChars, +PadChars, -Sep, -String) Read a string f
name_value(String, Name, Value) :- sub_string(String, Before, _, After, "="), !, sub_atom(String, 0, Before, _, Name), sub_string(String, _, After, 0, Value).
atomics_to_string(List,’’, String)
.?- atomics_to_string([gnu, "gnat", 1], ', ', A). A = "gnu, gnat, 1"