EffectiveSizeOf<T>(ref T)
Returns the effective size in bytes of this string.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
EffectiveSizeOf<T>(T)
public static int EffectiveSizeOf<T>(this ref T fs) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Returns
Type | Description |
|---|---|
| int | The effective size in bytes of this string. |
Remarks
"Effective size" is , the number of bytes you need to copy when serializing the string. (The plus 3 accounts for the null-terminator byte and the 2 bytes that store the Length).
Length + 3Useful for checking whether this string will fit in the space of a smaller string.