Sometime back, I was writing an application engine using PeopleCode and I needed to insert a carriage return between two long strings getting concatenated so they look like two sentences one after the other. The below code explains how I achieved it.
&string1 = ‘Emplid xyz123 is terminated on 01/01/2008′
&string1 = ‘Emplid abc456 is terminated on 01/02/2008′
&mailString = &String1 | &String2;
/* This concatenation would lead &mailString look as shown below
Emplid xyz123 is terminated on 01/01/2008Emplid abc456 is terminated on 01/02/2008
*/
/* To put a CR/LF (both unix and DOS style linefeed, safe for all platforms), you would change the above line to read like this: */
&mailString = &String1 | char(10) | char (13) |&String2;
/* Now the &mailString will look like as shown below
Emplid xyz123 is terminated on 01/01/2008
Emplid abc456 is terminated on 01/02/2008
*/