docs.unity3d.com
    Show / Hide Table of Contents

    Class Smart

    This class holds a Default instance of the SmartFormatter. The default instance has all extensions registered.

    Inheritance
    Object
    Smart
    Namespace: UnityEngine.Localization.SmartFormat
    Syntax
    public static class Smart : object

    Properties

    Default

    The default formatter that is used when no formatter is explicitly used.

    Declaration
    public static SmartFormatter Default { get; set; }
    Property Value
    Type Description
    SmartFormatter

    Methods

    CreateDefaultSmartFormat()

    Creates a new formatter with default settings.

    Declaration
    public static SmartFormatter CreateDefaultSmartFormat()
    Returns
    Type Description
    SmartFormatter

    The new formatter.

    Format(IFormatProvider, String, Object[])

    Replaces one or more format items in a specified string with the string representation of a specific object.

    Declaration
    public static string Format(IFormatProvider provider, string format, params object[] args)
    Parameters
    Type Name Description
    IFormatProvider provider

    The to use.

    String format

    A composite format string.

    Object[] args

    The object to format.

    Returns
    Type Description
    String

    Returns the formatted input with items replaced with their string representation.

    Format(String, Object)

    Replaces one or more format items in a specified string with the string representation of a specific object.

    Declaration
    public static string Format(string format, object arg0)
    Parameters
    Type Name Description
    String format

    A composite format string.

    Object arg0
    Returns
    Type Description
    String

    Returns the formatted input with items replaced with their string representation.

    Format(String, Object, Object)

    Replaces one or more format items in a specified string with the string representation of a specific object.

    Declaration
    public static string Format(string format, object arg0, object arg1)
    Parameters
    Type Name Description
    String format
    Object arg0
    Object arg1
    Returns
    Type Description
    String

    Returns the formatted input with items replaced with their string representation.

    Format(String, Object, Object, Object)

    Replaces one or more format items in a specified string with the string representation of a specific object.

    Declaration
    public static string Format(string format, object arg0, object arg1, object arg2)
    Parameters
    Type Name Description
    String format
    Object arg0
    Object arg1
    Object arg2
    Returns
    Type Description
    String

    Returns the formatted input with items replaced with their string representation.

    Format(String, Object[])

    Replaces one or more format items in a specified string with the string representation of a specific object.

    Declaration
    public static string Format(string format, params object[] args)
    Parameters
    Type Name Description
    String format

    A composite format string.

    Object[] args

    The object to format.

    Returns
    Type Description
    String

    Returns the formatted input with items replaced with their string representation.

    Back to top
    Terms of use
    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