Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

FixedStringMethods.CopyFrom

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static CopyError CopyFrom(ref T fs, ref T2 input);

Parameters

Parameter Description
fs The destination string.
input The source string.

Returns

CopyError CopyError.None if successful. Returns CopyError.Truncation if the source string is too large to fit in the destination.

Description

Copies another string to this string (making the two strings equal).

When the method returns an error, the destination string is not modified.


Declaration

public static CopyError CopyFrom(ref T fs, string s);

Parameters

Parameter Description
fs The destination string.
s The source string.

Returns

CopyError CopyError.None if successful. Returns CopyError.Truncation if the source string is too large to fit in the destination.

Description

Copies another string to this string (making the two strings equal). Replaces any existing content of the FixedString.

When the method returns an error, the destination string is not modified.