Method Trim
Trim(StringBuilder)
Removes all leading and trailing whitespace from builder.
Declaration
public static StringBuilder Trim(this StringBuilder builder)
Parameters
| Type | Name | Description | 
|---|---|---|
| System.Text.StringBuilder | builder | The System.Text.StringBuilder to remove leading and trailing whitespace from.  | 
    
Returns
| Type | Description | 
|---|---|
| System.Text.StringBuilder | A reference to   | 
    
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | Thrown if   | 
    
Trim(StringBuilder, Char[])
Removes all leading and trailing characters in builder that exist within trimChars.
Declaration
public static StringBuilder Trim(this StringBuilder builder, params char[] trimChars)
Parameters
| Type | Name | Description | 
|---|---|---|
| System.Text.StringBuilder | builder | The System.Text.StringBuilder to remove leading and trailing characters from.  | 
    
| System.Char[] | trimChars | An array of System.Char representing the characters to be removed.  | 
    
Returns
| Type | Description | 
|---|---|
| System.Text.StringBuilder | A reference to   | 
    
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | Thrown if   |