MagicCMS Documentation

StringHtmlExtensions..::..TruncateWords Method (String, Int32, String)

Truncates text and discars any partial words left at the end

Namespace:  System
Assembly:  MagicCMS.4.5 (in MagicCMS.4.5.dll)

Syntax


public static string TruncateWords(
	this string text,
	int maxCharacters,
	string trailingText
)

Parameters

text
Type: String
The text.
maxCharacters
Type: Int32
The maximum characters.
trailingText
Type: String
The trailing text.

Return Value

Resulting text