C-DEngine 5.105

TheCommonUtils..::..cdeSubstringMax Method

Truncates strings longer than a specified maximum length.

Namespace:  nsCDEngine.BaseClasses
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public static string cdeSubstringMax(
	string pIn,
	int pMax
)
Public Shared Function cdeSubstringMax ( _
	pIn As String, _
	pMax As Integer _
) As String
public:
static String^ cdeSubstringMax(
	String^ pIn, 
	int^ pMax
)

Parameters

pIn
Type: String
String to truncate.
pMax
Type: Int32
Maximum allowed characters in the string.

Return Value

A string that is guaranteed to be no longer than pMax+3 in length.

Remarks


This function truncates a string and adds an elipses ("...") to the end of the string when the string length exceeds the value of pMax.