Open ScreamingDev opened 8 years ago
This would need a multibyte safe wordwrap()
function that also preserves trailing whitespace.
I mention whitespace because this:
$string = wordwrap('Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly ', 78);
var_dump(explode("\n", $string));
will result in this:
array(2) {
[0]=>
string(75) "Twenty Sixteen is a modernized take on an ever-popular WordPress layout —"
[1]=>
string(76) "the horizontal masthead with an optional right sidebar that works perfectly "
}
Note the missing space after the dash.
Po-Files can have multiline strings:
This makes it more readable in the IDE than a looooong single-line string.