Trims a string to the specified length without breaking words and with applying auto ellipsis character (...) at the end of a trimmed string.

Namespace: MonoSoftware.Core
Assembly: MonoSoftware.Core (in MonoSoftware.Core.dll) Version: 1.0.40.669 (1.0.40.669)

Syntax

C#
public static string ToTrimmedWordString(
	this string value,
	int length
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function ToTrimmedWordString ( 
	value As String,
	length As Integer
) As String
Visual C++
public:
[ExtensionAttribute]
static String^ ToTrimmedWordString(
	String^ value, 
	int length
)
F#
static member ToTrimmedWordString : 
        value : string * 
        length : int -> string 

Parameters

value
Type: System..::..String
String to trim
length
Type: System..::..Int32
Maximum number of characters that a trimmed string should contain minus auto ellipsis character (...)

Return Value

Type: String
Trimmed string

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also