english/libraries/joomla/html/html/string.php
/**
	 * Abridges text strings over the specified character limit. The
	 * behavior will insert an ellipsis into the text replacing a section
	 * of variable size to ensure the string does not exceed the defined
	 * maximum length. This method is UTF-8 safe.
	 *
	 *	eg. Transform "Really long title" to "Really...title"
	 *
	 * @param   string   $text		The text to abridge.
	 * @param   integer  $length		The maximum length of the text.
	 * @param   integer  $intro		The maximum length of the intro text.
	 *
	 * @return  string   The abridged text.
	 */
Abridges text strings over the specified character limit. The
behavior will insert an ellipsis into the text replacing a section
of variable size to ensure the string does not exceed the defined
maximum length. This method is UTF-8 safe.

eg. Transform "Really long title" to "Really...title"

@param   string   $text              The text to abridge.
@param   integer  $length            The maximum length of the text.
@param   integer  $intro             The maximum length of the intro text.

@return  string   The abridged text.
Abridges text strings over the specified character limit . The behavior will insert an ellipsis into the text replacing a section of variable size to ensure the string does not exceed the defined maximum length . This method is UTF - 8 safe . eg . Transform " Really long title " to " Really ... title " @param string $text The text to abridge . @param integer $length The maximum length of the text . @param integer $intro The maximum length of the intro text . @return string The abridged text .
public static function abridge($text, $length = 50, $intro = 30)
	{
		if (JString::strlen($text) > $length) {
			$remainder = $length - ($intro + 3);
			$beg = JString::substr($text, 0, $intro);
			$end = JString::substr($text, JString::strlen($text)-$remainder);
			$text = $beg.'...'.$end;
		}
		return $text;
	}
public static function abridge ( $ text , $ length = 50 , $ intro = 30 ) { if ( JString :: strlen ( $ text ) > $ length ) { $ remainder = $ length - ( $ intro + 3 ) ; $ beg = JString :: substr ( $ text , 0 , $ intro ) ; $ end = JString :: substr ( $ text , JString :: strlen ( $ text ) - $ remainder ) ; $ text = $ beg . '...' . $ end ; } return $ text ; }
Abridges text strings over the specified character limit.
Abridges text strings over the specified character limit .
// Abridge the item text if it is too long. // Determine the remaining text length. // Extract the beginning and ending text sections. // Build the resulting string.