# Capacity

> The number of bytes this string has for storing UTF-8 characters.

## Definition

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

```csharp
public int Capacity { readonly get; set; }
```

### Remarks

Does not include the null-terminator byte.

A setter is included for conformity with [INativeList\<T>](/engine/6000.7/script-reference/unity/collections/inativelist1.md), but [FixedString4096Bytes.Capacity](/engine/6000.7/script-reference/unity/collections/fixedstring4096bytes/capacity.md) is fixed at 4093. Setting the value to anything other than 4093 throws an exception.

In UTF-8 encoding, each Unicode code point (character) requires 1 to 4 bytes, so the number of characters that can be stored may be less than the capacity.
