# Placeholder

> A placeholder is the part of a format string between the {braces}.

## 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)

```csharp
public class Placeholder : FormatItem
```

## Remarks

For example, in "\{Items.Length,-10:choose(1|2|3):one|two|three}", the [Placeholder.Alignment](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/alignment.md)s is "-10", the [Selector](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/selector.md)s are "Items" and "Length", separated by the dot "Operator". the [Placeholder.FormatterName](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/formattername.md) is "choose", the [Placeholder.FormatterOptionsRaw](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/formatteroptionsraw.md) is "1|2|3", and the [Placeholder.Format](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/format.md) is "one|two|three".

## Properties

| Property                                                                                                                  | Description                                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Alignment](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/alignment.md)                     | Gets or sets the [Placeholder.Alignment](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/alignment.md) of the result string, used like with string.Format("\{0,-10}"), where -10 is the alignment.     |
| [Format](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/format.md)                           | Gets or sets the [Placeholder.Format](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/format.md) of the [Placeholder](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder.md). |
| [FormatterName](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/formattername.md)             | Gets the name of the formatter.                                                                                                                                                                                                    |
| [FormatterOptions](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/formatteroptions.md)       | Gets the formatter option string unescaped. To get the raw formatter option string, [Placeholder.FormatterOptionsRaw](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/formatteroptionsraw.md).         |
| [FormatterOptionsRaw](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/formatteroptionsraw.md) | Gets the raw formatter option string as in the input format string (unescaped).                                                                                                                                                    |
| [NestedDepth](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/nesteddepth.md)                 | Gets or sets the nesting level of the [Placeholder](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder.md).                                                                                               |
| [Parent](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/parent.md)                           | Gets the parent [Format](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format.md).                                                                                                                               |

## Methods

| Method                                                                                                      | Description                                                                                                                                                                                                                        |
| ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GetSelectors](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/getselectors.md) | Gets an IReadOnlyList\_1 of all [Selector](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/selector.md)s within the [Placeholder](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder.md). |
| [Initialize](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/initialize.md)     | Initializes the instance of [Placeholder](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder.md).                                                                                                         |
| [ReturnToPool](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/returntopool.md) | Return items we own to the object pools. This method gets called by LiteralTextPool when it releases an instance.                                                                                                                  |
| [ToString](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder/tostring.md)         | Gets the string representation of the [Placeholder](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder.md) with all parsed components.                                                                    |

## Inheritance

**Inherited Members:**

* [FormatItem.Initialize(SmartSettings, FormatItem, string, int, int)](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem/initialize.md)
* [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)
