Daniel's XL Toolbox NG
Bovender.Extensions.StringExtensions Class Reference

Static Public Member Functions

static string TruncateWithEllipsis (this string s, int length)
 Truncates a string and adds three dots (ellipsis) so that the resulting string is at most "<paramref name="length"/>" characters long. More...
 
static string TruncateWithEllipsis (this string s, int length)
 Truncates a string and adds three dots (ellipsis) so that the resulting string is at most "<paramref name="length"/>" characters long. More...
 

Member Function Documentation

◆ TruncateWithEllipsis() [1/2]

static string Bovender.Extensions.StringExtensions.TruncateWithEllipsis ( this string  s,
int  length 
)
inlinestatic

Truncates a string and adds three dots (ellipsis) so that the resulting string is at most "<paramref name="length"/>" characters long.

Parameters
sString to truncate
lengthMaximum length of resulting string, including ellipsis; an exception is thrown if this is 5 or less.
Returns
String at most "<paramref name="length"/>" characters long.

◆ TruncateWithEllipsis() [2/2]

static string Bovender.Extensions.StringExtensions.TruncateWithEllipsis ( this string  s,
int  length 
)
inlinestatic

Truncates a string and adds three dots (ellipsis) so that the resulting string is at most "<paramref name="length"/>" characters long.

Parameters
sString to truncate
lengthMaximum length of resulting string, including ellipsis; an exception is thrown if this is 5 or less.
Returns
String at most "<paramref name="length"/>" characters long.

The documentation for this class was generated from the following file: