| concatenates or splits atoms.
atom_concat(+Atom1, +Atom2, -Atom3)
atom_concat(?Atom1, ?Atom2, +Atom3)
If Atom1 and Atom2 are atoms then Atom3 will be unified
with the concatenation of Atom1 and Atom2.
If Atom3 is an atom then Minerva will split Atom3 in two parts
(Part1 and Part2) and unify Atom1 with
Part1 and Atom2 with Part2.
Arguments
Atom1 atom
Atom2 atom
Atom3 atom
Examples
| atom_concat('this is', ' an example', A3). |
Succeeds with substitution A3 <- 'this is an example' |
| atom_concat(A1, A2, 'abc'). |
Succeeds with substitutions
{A1 <- '', A2 <- 'abc'}
{A1 <- 'a', A2 <- 'bc'}
{A1 <- 'ab', A2 <- 'c'}
{A1 <- 'abc', A2 <- ''} |
| atom_concat(Basename, '.txt', 'hello.txt'). |
Succeeds with substitutions
{Basename <- hello}
|
Standard
This predicate is part of the ISO-Prolog Standard.
See also
atom_chars/2,
atom_codes/2,
atom_length/2,
atom_number/2,
char_code/2,
number_chars/2,
number_codes/2,
parse_atom/2/3,
sub_atom/5.
|