# Append

> Appends a Unicode.Rune to this string.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## Append\<T>(T, Rune)

Appends a Unicode.Rune to this string.

```csharp
public static FormatError Append<T>(this ref T fs, Unicode.Rune rune) where T : unmanaged, INativeList<byte>, IUTF8Bytes
```

### Parameters

**** (T): A FixedString"N"Bytes.**** (\[Rune]\(/engine/6000.7/script-reference/unity/collections/unicode/rune)): A Unicode.Rune to append.

### Returns

| Type                                                                            | Description                                                                                             |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [FormatError](/engine/6000.7/script-reference/unity/collections/formaterror.md) | FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |

## Append\<T>(T, char)

Appends a char to this string.

```csharp
public static FormatError Append<T>(this ref T fs, char ch) where T : unmanaged, INativeList<byte>, IUTF8Bytes
```

### Parameters

**** (T): A FixedString"N"Bytes.**** (\[char]\(https\://learn.microsoft.com/dotnet/api/system.char)): A char to append.

### Returns

| Type                                                                            | Description                                                                                             |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [FormatError](/engine/6000.7/script-reference/unity/collections/formaterror.md) | FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |

## Append\<T>(T, Rune, int)

Appends a Unicode.Rune a number of times to this string.

```csharp
public static FormatError Append<T>(this ref T fs, Unicode.Rune rune, int count) where T : unmanaged, INativeList<byte>, IUTF8Bytes
```

### Parameters

**** (T): A FixedString"N"Bytes.**** (\[Rune]\(/engine/6000.7/script-reference/unity/collections/unicode/rune)): A Unicode.Rune to append some number of times.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of times to append the rune.

### Returns

| Type                                                                            | Description                                                                                             |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [FormatError](/engine/6000.7/script-reference/unity/collections/formaterror.md) | FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |

## Append\<T>(T, long)

Appends a number (converted to UTF-8 characters) to this string.

```csharp
public static FormatError Append<T>(this ref T fs, long input) where T : unmanaged, INativeList<byte>, IUTF8Bytes
```

### Parameters

**** (T): A FixedString"N"Bytes.**** (\[long]\(https\://learn.microsoft.com/dotnet/api/system.int64)): A long integer to append to the string.

### Returns

| Type                                                                            | Description                                                                                             |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [FormatError](/engine/6000.7/script-reference/unity/collections/formaterror.md) | FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |

## Append\<T>(T, int)

Appends a number (converted to UTF-8 characters) to this string.

```csharp
public static FormatError Append<T>(this ref T fs, int input) where T : unmanaged, INativeList<byte>, IUTF8Bytes
```

### Parameters

**** (T): A FixedString"N"Bytes.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An int to append to the string.

### Returns

| Type                                                                            | Description                                                                                             |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [FormatError](/engine/6000.7/script-reference/unity/collections/formaterror.md) | FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |

## Append\<T>(T, ulong)

Appends a number (converted to UTF-8 characters) to this string.

```csharp
public static FormatError Append<T>(this ref T fs, ulong input) where T : unmanaged, INativeList<byte>, IUTF8Bytes
```

### Parameters

**** (T): A FixedString"N"Bytes.**** (\[ulong]\(https\://learn.microsoft.com/dotnet/api/system.uint64)): A ulong integer to append to the string.

### Returns

| Type                                                                            | Description                                                                                             |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [FormatError](/engine/6000.7/script-reference/unity/collections/formaterror.md) | FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |

## Append\<T>(T, uint)

Appends a number (converted to UTF-8 characters) to this string.

```csharp
public static FormatError Append<T>(this ref T fs, uint input) where T : unmanaged, INativeList<byte>, IUTF8Bytes
```

### Parameters

**** (T): A FixedString"N"Bytes.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): A uint to append to the string.

### Returns

| Type                                                                            | Description                                                                                             |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [FormatError](/engine/6000.7/script-reference/unity/collections/formaterror.md) | FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |

## Append\<T>(T, float, char)

Appends a number (converted to UTF-8 characters) to this string.

```csharp
public static FormatError Append<T>(this ref T fs, float input, char decimalSeparator = '.') where T : unmanaged, INativeList<byte>, IUTF8Bytes
```

### Parameters

**** (T): A FixedString"N"Bytes.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): A float to append to the string.**** (\[char]\(https\://learn.microsoft.com/dotnet/api/system.char)): The character to use as the decimal separator. Defaults to a period ('.').

### Returns

| Type                                                                            | Description                                                                                             |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [FormatError](/engine/6000.7/script-reference/unity/collections/formaterror.md) | FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |

## Append\<T, U>(T, T)

Appends another string to this string.

```csharp
public static FormatError Append<T, T2>(this ref T fs, in T2 input) where T : unmanaged, INativeList<byte>, IUTF8Bytes where T2 : unmanaged, INativeList<byte>, IUTF8Bytes
```

### Parameters

**** (T): The destination string.**** (T): The source string.

### Returns

| Type                                                                            | Description                                                                                                         |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [FormatError](/engine/6000.7/script-reference/unity/collections/formaterror.md) | FormatError.None if successful. Returns FormatError.Overflow if the capacity of the destination string is exceeded. |

### Remarks

When the method returns an error, the destination string is not modified.

## Append\<T>(T, byte\*, int)

Appends bytes to this string.

```csharp
public static FormatError Append<T>(this ref T fs, byte* utf8Bytes, int utf8BytesLength) where T : unmanaged, INativeList<byte>, IUTF8Bytes
```

### Parameters

**** (T): The destination string.**** (\[byte\*]\(https\://learn.microsoft.com/dotnet/api/system.byte)): The bytes to append.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of bytes to append.

### Returns

| Type                                                                            | Description                                                                                                         |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [FormatError](/engine/6000.7/script-reference/unity/collections/formaterror.md) | FormatError.None if successful. Returns FormatError.Overflow if the capacity of the destination string is exceeded. |

### Remarks

When the method returns an error, the destination string is not modified.

No validation is performed: it is your responsibility for the destination to contain valid UTF-8 when you're done appending bytes.

## Append\<T>(T, string)

Appends another string to this string.

```csharp
[ExcludeFromBurstCompatTesting("Takes managed string")]
public static FormatError Append<T>(this ref T fs, string s) where T : unmanaged, INativeList<byte>, IUTF8Bytes
```

### Parameters

**** (T): The destination string.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The string to append.

### Returns

| Type                                                                            | Description                                                                                                         |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [FormatError](/engine/6000.7/script-reference/unity/collections/formaterror.md) | FormatError.None if successful. Returns FormatError.Overflow if the capacity of the destination string is exceeded. |

### Remarks

When the method returns an error, the destination string is not modified.
