186aa3c2 7612 0641 b46a 808bf59e0378 - akesseler/Plexdata.Utilities.Templates GitHub Wiki

Template.Truncate Method

Cuts off the builder, if necessary.

Namespace: Plexdata.Utilities.Formatting
Assembly: Plexdata.Utilities.Templates (in Plexdata.Utilities.Templates.dll) Version: 1.0.0

Syntax

C#

private static StringBuilder Truncate(
	Options options,
	StringBuilder builder
)

Parameters

 

options
Type: Plexdata.Utilities.Formatting.Options
The options to take the maximum allowed length from.
builder
Type: System.Text.StringBuilder
The builder whose content must be limited.

Return Value

Type: StringBuilder
The builder whose content has been limited.

Remarks

This method cuts off the value of builder, but only if its length exceeds the Maximum length defined in provided options.

Triple dots are appended to the builder in case of its content has been cut off.

See Also

Reference

Template Class
Plexdata.Utilities.Formatting Namespace
Options.Maximum
Options.IsLimited

⚠️ **GitHub.com Fallback** ⚠️