ドキュメント

Unity Engine

Unity Engine

Capacity

The number of bytes this string has for storing UTF-8 characters.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Property
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule
public int Capacity { readonly get; set; }

Remarks

Does not include the null-terminator byte.
A setter is included for conformity with INativeList<T>, 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.