docs.unity3d.com
    Show / Hide Table of Contents

    Class FormatItem

    Base class that represents a substring of text from a parsed format string.

    Inheritance
    Object
    FormatItem
    Format
    LiteralText
    Placeholder
    Selector
    Namespace: UnityEngine.Localization.SmartFormat.Core.Parsing
    Syntax
    public abstract class FormatItem : object

    Fields

    baseString

    Declaration
    public string baseString
    Field Value
    Type Description
    String

    endIndex

    Declaration
    public int endIndex
    Field Value
    Type Description
    Int32

    m_RawText

    Declaration
    protected string m_RawText
    Field Value
    Type Description
    String

    SmartSettings

    Declaration
    protected SmartSettings SmartSettings
    Field Value
    Type Description
    SmartSettings

    startIndex

    Declaration
    public int startIndex
    Field Value
    Type Description
    Int32

    Properties

    Parent

    Declaration
    public FormatItem Parent { get; }
    Property Value
    Type Description
    FormatItem

    RawText

    Retrieves the raw text that this item represents.

    Declaration
    public string RawText { get; }
    Property Value
    Type Description
    String

    Methods

    Clear()

    Declaration
    public virtual void Clear()

    Init(SmartSettings, FormatItem, Int32)

    Declaration
    public void Init(SmartSettings smartSettings, FormatItem parent, int startIndex)
    Parameters
    Type Name Description
    SmartSettings smartSettings
    FormatItem parent
    Int32 startIndex

    Init(SmartSettings, FormatItem, Int32, Int32)

    Declaration
    public void Init(SmartSettings smartSettings, FormatItem parent, int startIndex, int endIndex)
    Parameters
    Type Name Description
    SmartSettings smartSettings
    FormatItem parent
    Int32 startIndex
    Int32 endIndex

    Init(SmartSettings, FormatItem, String, Int32, Int32)

    Declaration
    public void Init(SmartSettings smartSettings, FormatItem parent, string baseString, int startIndex, int endIndex)
    Parameters
    Type Name Description
    SmartSettings smartSettings
    FormatItem parent
    String baseString
    Int32 startIndex
    Int32 endIndex

    ToEnumerable()

    Declaration
    public IEnumerable<char> ToEnumerable()
    Returns
    Type Description
    IEnumerable<Char>

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    Extension Methods

    TupleExtensions.IsValueTuple(Object)
    TupleExtensions.GetValueTupleItemObjects(Object)
    TupleExtensions.GetValueTupleItemObjectsFlattened(Object)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023