Adding line endings to a string

Here’s some PeopleCode I wrote that will add a carriage return and line feed to the end of a String if it is not empty:

or as a method:

Note: This assumes that you want Windows line endings. Typically unix line endings just have a single line feed (Char(10) with no carriage return.

Leave a Reply

Your email address will not be published. Required fields are marked *