Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

LiteralText

class in Unity.SmartStrings.Core.Parsing

/

Inherits from:Unity.SmartStrings.Core.Parsing.FormatItem

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Represents the literal text that is found in a parsed format string.

Public Methods

Method Description
AsSpan Gets the character span for the LiteralText, with escaped characters converted. Note: The Parser puts each escaped character of an input string into its own LiteralText item.
Clear Clears the LiteralText item. This method gets called by Unity.SmartStrings.Pooling.SmartPools.LiteralTextPool when it releases an instance.
Initialize Initializes the LiteralText instance, representing the literal text that is found in a parsed format string.
ToString Get the string representation of the LiteralText, with escaped characters converted. Note: The Parser puts each escaped character of an input string into its own LiteralText item.

Inherited Members

Properties

PropertyDescription
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.