Format
Replaces one or more format items in a specified string with the string representation of a specific object.
Read time 3 minutesLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.SmartStrings
- Assembly: UnityEngine.SmartStringsModule
Format(string, Object[])
Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(string format, params object[] args)
Parameters
Returns
Type | Description |
|---|---|
| string | Returns the formatted input with items replaced with their string representation. |
Format(string, IList<Object>)
Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(string format, IList<object> args)
Parameters
Returns
Type | Description |
|---|---|
| string | Returns the formatted input with items replaced with their string representation. |
Format(IFormatProvider, string, Object[])
Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(IFormatProvider provider, string format, params object[] args)
Parameters
The IFormatProvider to use.
A composite format string.
The object to format.
Returns
Type | Description |
|---|---|
| string | Returns the formatted input with items replaced with their string representation. |
Format(IFormatProvider, string, IList<Object>)
Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(IFormatProvider provider, string format, IList<object> args)
Parameters
The IFormatProvider to use.
A composite format string.
The object to format.
Returns
Type | Description |
|---|---|
| string | Returns the formatted input with items replaced with their string representation. |
Format(Format, Object[])
Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(Format formatParsed, params object[] args)
Parameters
Returns
Type | Description |
|---|---|
| string | Returns the formatted input with items replaced with their string representation. |
Format(Format, IList<Object>)
Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(Format formatParsed, IList<object> args)
Parameters
Returns
Type | Description |
|---|---|
| string | Returns the formatted input with items replaced with their string representation. |
Format(IFormatProvider, Format, Object[])
Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(IFormatProvider provider, Format formatParsed, params object[] args)
Parameters
The IFormatProvider to use.
An instance of Format that was returned by Parser.ParseFormat.
The object to format.
Returns
Type | Description |
|---|---|
| string | Returns the formatted input with items replaced with their string representation. |
Format(IFormatProvider, Format, IList<Object>)
Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(IFormatProvider provider, Format formatParsed, IList<object> args)
Parameters
The IFormatProvider to use.
An instance of Format that was returned by Parser.ParseFormat.
The object to format.
Returns
Type | Description |
|---|---|
| string | Returns the formatted input with items replaced with their string representation. |
Format(FormattingInfo)
Formats the specified FormattingInfo.
public virtual void Format(FormattingInfo formattingInfo)
Parameters
Formatting context to process.