# StringOutput

> Wraps a StringBuilder so it can be used for output.

## Definition

* **Type:** Class
* **Namespace:** [Unity.SmartStrings.Core.Output](/engine/6000.7/script-reference/unity/smartstrings/core/output.md)
* **Assembly:** UnityEngine.SmartStringsModule
* **Implements:** [IOutput](/engine/6000.7/script-reference/unity/smartstrings/core/output/ioutput.md)

```csharp
public class StringOutput : IOutput
```

## Remarks

StringBuilder, UnicodeEncoding and `string` objects use **UTF-16** encoding to store characters.

## Constructors

| Constructor                                                                                                                                                  | Description                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [StringOutput()](/engine/6000.7/script-reference/unity/smartstrings/core/output/stringoutput/ctor.md#stringoutput\(\))                                       | Creates a new instance of [StringOutput](/engine/6000.7/script-reference/unity/smartstrings/core/output/stringoutput.md).                               |
| [StringOutput(System.Int32)](/engine/6000.7/script-reference/unity/smartstrings/core/output/stringoutput/ctor.md#stringoutput\(int\))                        | Creates a new instance of [StringOutput](/engine/6000.7/script-reference/unity/smartstrings/core/output/stringoutput.md) with the given capacity.       |
| [StringOutput(System.Text.StringBuilder)](/engine/6000.7/script-reference/unity/smartstrings/core/output/stringoutput/ctor.md#stringoutput\(stringbuilder\)) | Creates a new instance of [StringOutput](/engine/6000.7/script-reference/unity/smartstrings/core/output/stringoutput.md) using the given StringBuilder. |

## Methods

| Method                                                                                              | Description                                                                                                                   |
| --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [Clear](/engine/6000.7/script-reference/unity/smartstrings/core/output/stringoutput/clear.md)       | Clears the StringBuilder used to create the output. This method gets called by StringOutputPool when it releases an instance. |
| [ToString](/engine/6000.7/script-reference/unity/smartstrings/core/output/stringoutput/tostring.md) | Returns the results of the StringBuilder.                                                                                     |
| [Write](/engine/6000.7/script-reference/unity/smartstrings/core/output/stringoutput/write.md)       | Writes a character repeated `count` times to the StringBuilder object.                                                        |
