# Format

> Represents a parsed format string. Contains a list of FormatItem s, including LiteralText s and Placeholder s. Note: Format is IDisposable.

## Definition

* **Type:** Class
* **Namespace:** [Unity.SmartStrings.Core.Parsing](/engine/6000.7/script-reference/unity/smartstrings/core/parsing.md)
* **Assembly:** UnityEngine.SmartStringsModule
* **Inherits from:** [FormatItem](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem.md)
* **Implements:** [IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

```csharp
public sealed class Format : FormatItem, IDisposable
```

## Properties

| Property                                                                                                         | Description                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| [AdditionalData](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/additionaldata.md)       | Used to pass and return additional information during formatting.                                                     |
| [HasNested](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/hasnested.md)                 | Returns `true`, if the [Format](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format.md) is nested. |
| [Items](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/items.md)                         | Gets the List\_1 of [FormatItem](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem.md)s.     |
| [ParentPlaceholder](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/parentplaceholder.md) | Gets the parent [Placeholder](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder.md).        |

## Methods

| Method                                                                                                     | Description                                                                                                                                                                                                                 |
| ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Dispose](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/dispose.md)               | Returns this instance to the object pool, which also clears all objects it owns. Do not use this instance after calling [Format.Dispose](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/dispose.md) |
| [GetLiteralText](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/getliteraltext.md) | Retrieves the literal text contained in this format. Excludes escaped chars, and does not include the text of placeholders.                                                                                                 |
| [IndexOf](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/indexof.md)               | Searches the literal text for the search char. Does not search in nested placeholders.                                                                                                                                      |
| [Initialize](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/initialize.md)         | Initializes the [Format](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format.md) instance.                                                                                                               |
| [ReturnToPool](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/returntopool.md)     | Return items we own to the object pools. This method gets called by FormatPool when it releases an instance.                                                                                                                |
| [Split](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/split.md)                   | Splits the [Format](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format.md) items by the given search character.                                                                                         |
| [Substring](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/substring.md)           | Gets a substring of the current [Format](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format.md).                                                                                                        |
| [ToString](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format/tostring.md)             | Reconstructs the format string, but doesn't include escaped chars and tries to reconstruct placeholders.                                                                                                                    |

## Inheritance

**Inherited Members:**

* [FormatItem.Clear()](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem/clear.md)
* [FormatItem.AsSpan()](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem/asspan.md)
* [FormatItem.BaseString()](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem/basestring.md)
* [FormatItem.EndIndex()](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem/endindex.md)
* [FormatItem.StartIndex()](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem/startindex.md)
* [FormatItem.Length()](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem/length.md)
* [FormatItem.SmartSettings()](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem/smartsettings.md)
* [FormatItem.ParentFormatItem()](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem/parentformatitem.md)
* [FormatItem.RawText()](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem/rawtext.md)
