MagicCMS Documentation

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

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
)

Parameters

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

Return Value

Resulting text.