Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Format

Represents a parsed format string. Contains a list of FormatItem s, including LiteralText s and Placeholder s. Note: Format is IDisposable.
Read time 2 minutesLast updated 6 days ago

Definition

public sealed class Format : FormatItem, IDisposable

Properties

Property

Description

AdditionalDataUsed to pass and return additional information during formatting.
HasNestedReturns
true
, if the Format is nested.
ItemsGets the List_1 of FormatItems.
ParentPlaceholderGets the parent Placeholder.

Methods

Method

Description

DisposeReturns this instance to the object pool, which also clears all objects it owns. Do not use this instance after calling Format.Dispose
GetLiteralTextRetrieves the literal text contained in this format. Excludes escaped chars, and does not include the text of placeholders.
IndexOfSearches the literal text for the search char. Does not search in nested placeholders.
InitializeInitializes the Format instance.
ReturnToPoolReturn items we own to the object pools. This method gets called by FormatPool when it releases an instance.
SplitSplits the Format items by the given search character.
SubstringGets a substring of the current Format.
ToStringReconstructs the format string, but doesn't include escaped chars and tries to reconstruct placeholders.

Inheritance