Method CopyFrom
CopyFrom<T, T2>(ref T, in T2)
Copies another string to this string (making the two strings equal).
Declaration
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
Type | Name | Description |
---|---|---|
T | fs | The destination string. |
T2 | input | The source string. |
Returns
Type | Description |
---|---|
Copy |
CopyError.None if successful. Returns CopyError.Truncation if the source string is too large to fit in the destination. |
Type Parameters
Name | Description |
---|---|
T | The type of the destination string. |
T2 | The type of the source string. |
Remarks
When the method returns an error, the destination string is not modified.
CopyFrom<T>(ref T, string)
Copies another string to this string (making the two strings equal). Replaces any existing content of the FixedString.
Declaration
[ExcludeFromBurstCompatTesting("Takes managed string")]
public static CopyError CopyFrom<T>(this ref T fs, string s) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | fs | The destination string. |
string | s | The source string. |
Returns
Type | Description |
---|---|
Copy |
CopyError.None if successful. Returns CopyError.Truncation if the source string is too large to fit in the destination. |
Type Parameters
Name | Description |
---|---|
T | The type of the destination string. |
Remarks
When the method returns an error, the destination string is not modified.