# Format

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

## Definition

* **Type:** Method
* **Namespace:** [Unity.SmartStrings](/engine/6000.7/script-reference/unity/smartstrings.md)
* **Assembly:** UnityEngine.SmartStringsModule

## Format(string, Object\[])

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

```csharp
public string Format(string format, params object[] args)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A composite format string.**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): The object to format.

### Returns

| Type                                                           | Description                                                                       |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.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.

```csharp
public string Format(string format, IList<object> args)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A composite format string.**** (\[IList\<Object>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1)): The object to format.

### Returns

| Type                                                           | Description                                                                       |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.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.

```csharp
public string Format(IFormatProvider provider, string format, params object[] args)
```

### Parameters

**** (\[IFormatProvider]\(https\://learn.microsoft.com/dotnet/api/system.iformatprovider)): The IFormatProvider to use.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A composite format string.**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): The object to format.

### Returns

| Type                                                           | Description                                                                       |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.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.

```csharp
public string Format(IFormatProvider provider, string format, IList<object> args)
```

### Parameters

**** (\[IFormatProvider]\(https\://learn.microsoft.com/dotnet/api/system.iformatprovider)): The IFormatProvider to use.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A composite format string.**** (\[IList\<Object>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1)): The object to format.

### Returns

| Type                                                           | Description                                                                       |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.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.

```csharp
public string Format(Format formatParsed, params object[] args)
```

### Parameters

**** (\[Format]\(/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format)): An instance of [Format](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format.md) that was returned by [Parser.ParseFormat](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/parser/parseformat.md).**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): The object to format.

### Returns

| Type                                                           | Description                                                                       |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.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.

```csharp
public string Format(Format formatParsed, IList<object> args)
```

### Parameters

**** (\[Format]\(/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format)): An instance of [Format](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format.md) that was returned by [Parser.ParseFormat](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/parser/parseformat.md).**** (\[IList\<Object>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1)): The object to format.

### Returns

| Type                                                           | Description                                                                       |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.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.

```csharp
public string Format(IFormatProvider provider, Format formatParsed, params object[] args)
```

### Parameters

**** (\[IFormatProvider]\(https\://learn.microsoft.com/dotnet/api/system.iformatprovider)): The IFormatProvider to use.**** (\[Format]\(/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format)): An instance of [Format](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format.md) that was returned by [Parser.ParseFormat](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/parser/parseformat.md).**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): The object to format.

### Returns

| Type                                                           | Description                                                                       |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.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.

```csharp
public string Format(IFormatProvider provider, Format formatParsed, IList<object> args)
```

### Parameters

**** (\[IFormatProvider]\(https\://learn.microsoft.com/dotnet/api/system.iformatprovider)): The IFormatProvider to use.**** (\[Format]\(/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format)): An instance of [Format](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/format.md) that was returned by [Parser.ParseFormat](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/parser/parseformat.md).**** (\[IList\<Object>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1)): The object to format.

### Returns

| Type                                                           | Description                                                                       |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | Returns the formatted input with items replaced with their string representation. |

## Format(FormattingInfo)

Formats the specified [FormattingInfo](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo.md).

```csharp
public virtual void Format(FormattingInfo formattingInfo)
```

### Parameters

**** (\[FormattingInfo]\(/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo)): Formatting context to process.
