class in Unity.SmartStrings.Core.Parsing
/
Inherits from:Unity.SmartStrings.Core.Parsing.FormatItem
Represents a parsed format string.
Contains a list of FormatItems,
including LiteralTexts and Placeholders.
Note: Format is IDisposable.
| Property | Description |
|---|---|
| AdditionalData | Used to pass and return additional information during formatting. |
| HasNested | Returns true, if the Format is nested. |
| Items | Gets the Collections.Generic.List_1 of FormatItems. |
| ParentPlaceholder | Gets the parent Placeholder. |
| Method | Description |
|---|---|
| Dispose | Returns this instance to the object pool, which also clears all objects it owns. Do not use this instance after calling Format.Dispose |
| GetLiteralText | Retrieves the literal text contained in this format. Excludes escaped chars, and does not include the text of placeholders. |
| IndexOf | Searches the literal text for the search char. Does not search in nested placeholders. |
| Initialize | Initializes the Format instance. |
| ReturnToPool | Return items we own to the object pools. This method gets called by Unity.SmartStrings.Pooling.SmartPools.FormatPool when it releases an instance. |
| Split | Splits the Format items by the given search character. |
| Substring | Gets a substring of the current Format. |
| ToString | Reconstructs the format string, but doesn't include escaped chars and tries to reconstruct placeholders. |
| Property | Description |
|---|---|
| BaseString | Gets the base format string. |
| EndIndex | The end index is pointing to ONE POSITION AFTER the last character of item. |
| Length | Gets the result of FormatItem.EndIndex minus FormatItem.StartIndex. |
| ParentFormatItem | The parent FormatItem of this instance, null if no parent exists. |
| RawText | Retrieves the raw text that this item represents. |
| SmartSettings | The settings for formatter and parser. |
| StartIndex | The start index is pointing to the first character of item. |
| Method | Description |
|---|---|
| AsSpan | Gets the ReadOnlySpan_1 representation of this FormatItem. |
| Clear | Clears the FormatItem or the derived class. |
| Method | Description |
|---|---|
| Initialize | Initializes the FormatItem or the derived class. |