Trims a string, making sure that it is not cut off in the middle of a word.

Namespace: MonoSoftware.MonoX.Utilities
Assembly: MonoX (in MonoX.dll) Version: 5.1.40.5065 (5.1.40.5065)

Syntax

C#
public static string TrimString(
	string s,
	int maxChars,
	bool stripHtml
)
Visual Basic
Public Shared Function TrimString ( 
	s As String,
	maxChars As Integer,
	stripHtml As Boolean
) As String
Visual C++
public:
static String^ TrimString(
	String^ s, 
	int maxChars, 
	bool stripHtml
)
F#
static member TrimString : 
        s : string * 
        maxChars : int * 
        stripHtml : bool -> string 

Parameters

s
Type: System..::..String
String to trim
maxChars
Type: System..::..Int32
Maximum number of characters that a string should contain
stripHtml
Type: System..::..Boolean
Determines wheter to strip HTML tags from the string

Return Value

Type: String
Trimmed string

See Also