SproutCMS

This is the code documentation for the SproutCMS project

function limitWords()

Limits a plain-text phrase to a given number of words.

Usage

string Text::limitWords ( string $str [, int $limit [, string $end_char ]] );

Arguments

  1. string $str
    Phrase to limit words of, in plain text
  2. int $limit = 100
    Number of words to limit to
  3. string $end_char = NULL
    Characters to append if text is limited, e.g. '...'

Return value

  • string
    Plain text