function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mikebzmikebz 

multi-line string

is there a way to do a multi line string in Apex Code?

 

This is an example from PHP (http://php.net/manual/en/language.types.string.php)

 

$str = <<<'EOD'
Example of string
spanning multiple lines
using nowdoc syntax.
EOD;

sfdcfoxsfdcfox

Nope. You'll have to it the old-fashioned way:

 

string x = 'This is line one.\n'+
    'This is line two.\n'+
    'This is line three.';