
concat_strings(+Src1, +Src2, ?Dest)

   Succeeds if Dest is the concatenation of Src1 and Src2.



Arguments
   +Src1               String.
   +Src2               String.
   ?Dest               String or variable.

Type
   Strings and Atoms

Description
   Dest is unified with the concatenation of Src1 and Src2.




Resatisfiable
      No.

Fail Conditions
      Fails if Dest does not unify with the concatenation of Src1 and Src2.



Exceptions
     4 --- Either (or both) of Src1 and Src2 is not instantiated    (non-coroutine mode only).
     5 --- Either (or both) of Src1 and Src2 is instantiated, but not    to a string.
     5 --- Dest is neither a string nor a variable.

Examples
   
Success:
  concat_strings("abc","def",X). (gives X="abcdef").

  [eclipse]: [user].
   absolutename(File,Abs) :-
           string_list(File,List),
           arg(1,List,0'/) -> Abs = File;
                            (getcwd(Cwd),
                             concat_strings(Cwd,File,Abs)).
   user compiled 256 bytes in 0.02 seconds
  yes.
  [eclipse]: absolutename("d.pl",P), absolutename("/usr/bin",F).
  P = "/home/lp/user/d.pl"
  F = "/usr/bin"
  yes.

Fail:
  concat_strings("ab","bc","abc").

Error:
  concat_strings("a",X,"ab").             (Error 4).
  concat_strings("big",'gest',X).         (Error 5).





See Also
   append_strings / 3, concat_atoms / 3
