# AppendUTF8Bytes(byte*, ref int, int, byte*, int)

> Appends UTF-8 text to a buffer.

## Definition

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

## AppendUTF8Bytes(byte\*, int, int, byte\*, int)

```csharp
public static FormatError AppendUTF8Bytes(byte* dest, ref int destLength, int destCapacity, byte* src, int srcLength)
```

### Parameters

**** (\[byte\*]\(https\://learn.microsoft.com/dotnet/api/system.byte)): The destination buffer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Reference to the destination buffer's length in bytes "before" the append. Will be assigned the new length "after" the append.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The destination buffer capacity in bytes.**** (\[byte\*]\(https\://learn.microsoft.com/dotnet/api/system.byte)): The source buffer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of bytes to read from the source.

### Returns

| Type                                                                            | Description                                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [FormatError](/engine/6000.7/script-reference/unity/collections/formaterror.md) | [FormatError.None](/engine/6000.7/script-reference/unity/collections/formaterror/none.md) if the append fully completes. Otherwise, returns [FormatError.Overflow](/engine/6000.7/script-reference/unity/collections/formaterror/overflow.md). |

### Remarks

Assumes the source data is valid UTF-8.

No data will be copied if the destination has insufficient capacity for the full append, "i.e." if `srcLength > (destCapacity - destLength)`.
