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

FixedStringMethods.CopyFromTruncated

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 CopyFromTruncated(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. If the string exceeds the capacity it will be truncated. Replaces any existing content of the FixedString.


Declaration

public static CopyError CopyFromTruncated(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. If the string exceeds the capacity it will be truncated.

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