Class Smart
This class holds a Default instance of the SmartFormatter. The default instance has all extensions registered.
Namespace: UnityEngine.Localization.SmartFormat
Syntax
public static class Smart
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 IFormatProvider 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. |