CopyFrom
Copies another string to this string (making the two strings equal).
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
CopyFrom<T, U>(T, T)
Copies another string to this string (making the two strings equal).
public static CopyError CopyFrom<T, T2>(this ref T fs, in T2 input) where T : unmanaged, INativeList<byte>, IUTF8Bytes where T2 : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Returns
Type | Description |
|---|---|
| CopyError | CopyError.None if successful. Returns CopyError.Truncation if the source string is too large to fit in the destination. |
Remarks
When the method returns an error, the destination string is not modified.
CopyFrom<T>(T, string)
Copies another string to this string (making the two strings equal). Replaces any existing content of the FixedString.
[ExcludeFromBurstCompatTesting("Takes managed string")]public static CopyError CopyFrom<T>(this ref T fs, string s) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Returns
Type | Description |
|---|---|
| CopyError | CopyError.None if successful. Returns CopyError.Truncation if the source string is too large to fit in the destination. |
Remarks
When the method returns an error, the destination string is not modified.