186aa3c2 7612 0641 b46a 808bf59e0378 - akesseler/Plexdata.Utilities.Templates GitHub Wiki
Cuts off the builder, if necessary.
Namespace: Plexdata.Utilities.Formatting
Assembly: Plexdata.Utilities.Templates (in Plexdata.Utilities.Templates.dll) Version: 1.0.0
C#
private static StringBuilder Truncate(
Options options,
StringBuilder builder
)
- 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.
Type: StringBuilder
The builder whose content has been limited.
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.
Template Class
Plexdata.Utilities.Formatting Namespace
Options.Maximum
Options.IsLimited