docs.unity3d.com
    Show / Hide Table of Contents

    Class SubStringFormatter

    Formatter to access part of a string.

    Inheritance
    Object
    FormatterBase
    SubStringFormatter
    Inherited Members
    FormatterBase.Names
    Namespace: UnityEngine.Localization.SmartFormat.Extensions
    Syntax
    [Serializable]
    public class SubStringFormatter : FormatterBase, IFormatter, ISerializationCallbackReceiver

    Constructors

    SubStringFormatter()

    Creates a new instance of the formatter.

    Declaration
    public SubStringFormatter()

    Properties

    DefaultNames

    Default names to use when Names is null.

    Declaration
    public override string[] DefaultNames { get; }
    Property Value
    Type Description
    String[]
    Overrides
    FormatterBase.DefaultNames

    NullDisplayString

    Get or set the string to display for NULL values, defaults to "(null)".

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

    OutOfRangeBehavior

    Get or set the behavior for when start index and/or length is too great, defaults to ReturnEmptyString.

    Declaration
    public SubStringFormatter.SubStringOutOfRangeBehavior OutOfRangeBehavior { get; set; }
    Property Value
    Type Description
    SubStringFormatter.SubStringOutOfRangeBehavior

    ParameterDelimiter

    The delimiter to separate parameters, defaults to comma.

    Declaration
    public char ParameterDelimiter { get; set; }
    Property Value
    Type Description
    Char

    Methods

    TryEvaluateFormat(IFormattingInfo)

    Tries to process the given IFormattingInfo.

    Declaration
    public override bool TryEvaluateFormat(IFormattingInfo formattingInfo)
    Parameters
    Type Name Description
    IFormattingInfo formattingInfo

    Returns true if processed, otherwise false.

    Returns
    Type Description
    Boolean
    Overrides
    FormatterBase.TryEvaluateFormat(IFormattingInfo)
    In This Article
    • Constructors
      • SubStringFormatter()
    • Properties
      • DefaultNames
      • NullDisplayString
      • OutOfRangeBehavior
      • ParameterDelimiter
    • Methods
      • TryEvaluateFormat(IFormattingInfo)
    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