Class StringBuilderExtensions
System class extensions.
Namespace: Neon.Common
Assembly: Neon.Common.dll
Syntax
public static class StringBuilderExtensions
Methods
AppendLineLinux(StringBuilder, string)
Appends a line of text using a Linux-style (LF) line ending.
Declaration
public static void AppendLineLinux(this StringBuilder sb, string line = null)
Parameters
Type | Name | Description |
---|---|---|
StringBuilder | sb | The StringBuilder. |
string | line | The line. |
AppendWithSeparator(StringBuilder, string, string)
Appends non-null
and non-empty text, separating it from any existing text with a string.
Declaration
public static void AppendWithSeparator(this StringBuilder sb, string text, string separator = " ")
Parameters
Type | Name | Description |
---|---|---|
StringBuilder | sb | The StringBuilder. |
string | text | The text to be appended. |
string | separator | The separator string, this defaults to a single space. |
Remarks
note
The separator string will not be appended if text
is null
or empty.