Class StringBuilderFluentExtensions
Extensions for the StringBuilder class.
Inherited Members
Namespace: TheXDS.MCART.Types.Extensions
Assembly: MCART.dll
Syntax
public static class StringBuilderFluentExtensions
Methods
| Edit this page View SourceAppendAndWrap(StringBuilder, string?, int)
Appends a string after applying an operation that wraps the string into lines of up to width characters.
Declaration
public static StringBuilder AppendAndWrap(this StringBuilder sb, string? text, int width)
Parameters
| Type | Name | Description |
|---|---|---|
| StringBuilder | sb | Instance of StringBuilder to perform the operation on. |
| string | text | Text to append. If it's null, no action will be taken. |
| int | width | Maximum length of text lines to add. |
Returns
| Type | Description |
|---|---|
| StringBuilder | The same instance as |
AppendLineIfNotNull(StringBuilder, string?)
Appends the specified text followed by the default line terminator to the end of this instance only if the string is not null.
Declaration
public static StringBuilder AppendLineIfNotNull(this StringBuilder sb, string? text)
Parameters
| Type | Name | Description |
|---|---|---|
| StringBuilder | sb | Instance of StringBuilder to perform the operation on. |
| string | text | Text to append. If it's null, no action will be taken. |
Returns
| Type | Description |
|---|---|
| StringBuilder | The same instance as |