기술 자료

Unity Engine

Unity Engine

Capacity

The number of bytes this string has for storing UTF-8 characters.
읽는 시간 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 FixedString64Bytes.Capacity is fixed at 61. Setting the value to anything other than 61 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.