Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Append

Appends a Unicode.Rune to this string.
Read time 4 minutesLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule

Append<T>(T, Rune)

Appends a Unicode.Rune to this string.
public static FormatError Append<T>(this ref T fs, Unicode.Rune rune) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A FixedString"N"Bytes.

rune

A Unicode.Rune to append.

Returns

Type

Description

FormatErrorFormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded.

Append<T>(T, char)

Appends a char to this string.
public static FormatError Append<T>(this ref T fs, char ch) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A FixedString"N"Bytes.

A char to append.

Returns

Type

Description

FormatErrorFormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded.

Append<T>(T, Rune, int)

Appends a Unicode.Rune a number of times to this string.
public static FormatError Append<T>(this ref T fs, Unicode.Rune rune, int count) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A FixedString"N"Bytes.

rune

A Unicode.Rune to append some number of times.

count

The number of times to append the rune.

Returns

Type

Description

FormatErrorFormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded.

Append<T>(T, long)

Appends a number (converted to UTF-8 characters) to this string.
public static FormatError Append<T>(this ref T fs, long input) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A FixedString"N"Bytes.

input

A long integer to append to the string.

Returns

Type

Description

FormatErrorFormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded.

Append<T>(T, int)

Appends a number (converted to UTF-8 characters) to this string.
public static FormatError Append<T>(this ref T fs, int input) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A FixedString"N"Bytes.

input

An int to append to the string.

Returns

Type

Description

FormatErrorFormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded.

Append<T>(T, ulong)

Appends a number (converted to UTF-8 characters) to this string.
public static FormatError Append<T>(this ref T fs, ulong input) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A FixedString"N"Bytes.

input

A ulong integer to append to the string.

Returns

Type

Description

FormatErrorFormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded.

Append<T>(T, uint)

Appends a number (converted to UTF-8 characters) to this string.
public static FormatError Append<T>(this ref T fs, uint input) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A FixedString"N"Bytes.

input

A uint to append to the string.

Returns

Type

Description

FormatErrorFormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded.

Append<T>(T, float, char)

Appends a number (converted to UTF-8 characters) to this string.
public static FormatError Append<T>(this ref T fs, float input, char decimalSeparator = '.') where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A FixedString"N"Bytes.

input

A float to append to the string.

decimalSeparator

The character to use as the decimal separator. Defaults to a period ('.').

Returns

Type

Description

FormatErrorFormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded.

Append<T, U>(T, T)

Appends another string to this string.
public static FormatError Append<T, T2>(this ref T fs, in T2 input) where T : unmanaged, INativeList<byte>, IUTF8Bytes where T2 : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
The destination string.

input

T
The source string.

Returns

Type

Description

FormatErrorFormatError.None if successful. Returns FormatError.Overflow if the capacity of the destination string is exceeded.

Remarks

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

Append<T>(T, byte*, int)

Appends bytes to this string.
public static FormatError Append<T>(this ref T fs, byte* utf8Bytes, int utf8BytesLength) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
The destination string.

utf8Bytes

The bytes to append.

utf8BytesLength

The number of bytes to append.

Returns

Type

Description

FormatErrorFormatError.None if successful. Returns FormatError.Overflow if the capacity of the destination string is exceeded.

Remarks

When the method returns an error, the destination string is not modified.
No validation is performed: it is your responsibility for the destination to contain valid UTF-8 when you're done appending bytes.

Append<T>(T, string)

Appends another string to this string.
[ExcludeFromBurstCompatTesting("Takes managed string")]public static FormatError Append<T>(this ref T fs, string s) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
The destination string.

The string to append.

Returns

Type

Description

FormatErrorFormatError.None if successful. Returns FormatError.Overflow if the capacity of the destination string is exceeded.

Remarks

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