widont($text)

Avoids typographical widows in strings by replacing the last space with  

  • $text (string)
  • return (string)

Example

<?= widont($page->title()) ?>

Is something missing or incorrect? Edit this page on Github…