MagicCMS Documentation

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

Truncates text to a number of characters and adds trailing text, i.e. elipses, to the end

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

Syntax


public static string Truncate(
	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.