Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

FixedString128Bytes.Capacity

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public int Capacity;

Description

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

Does not include the null-terminator byte.

A setter is included for conformity with INativeList<T0>, but FixedString128Bytes.Capacity is fixed at 125. Setting the value to anything other than 125 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.