Method Append
Append<T>(ref T, Rune)
Appends a Unicode.Rune to this string.
Declaration
public static FormatError Append<T>(this ref T fs, Unicode.Rune rune) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Returns
Type | Description |
---|---|
Format |
FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |
Type Parameters
Name | Description |
---|---|
T | The type of FixedStringNBytes. |
Append<T>(ref T, char)
Appends a char to this string.
Declaration
public static FormatError Append<T>(this ref T fs, char ch) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | fs | A FixedStringNBytes. |
char | ch | A char to append. |
Returns
Type | Description |
---|---|
Format |
FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |
Type Parameters
Name | Description |
---|---|
T | The type of FixedStringNBytes. |
Append<T>(ref T, Rune, int)
Appends a Unicode.Rune a number of times to this string.
Declaration
public static FormatError Append<T>(this ref T fs, Unicode.Rune rune, int count) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | fs | A FixedStringNBytes. |
Unicode.Rune | rune | A Unicode.Rune to append some number of times. |
int | count | The number of times to append the rune. |
Returns
Type | Description |
---|---|
Format |
FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |
Type Parameters
Name | Description |
---|---|
T | The type of FixedStringNBytes. |
Append<T>(ref T, long)
Appends a number (converted to UTF-8 characters) to this string.
Declaration
public static FormatError Append<T>(this ref T fs, long input) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | fs | A FixedStringNBytes. |
long | input | A long integer to append to the string. |
Returns
Type | Description |
---|---|
Format |
FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |
Type Parameters
Name | Description |
---|---|
T | The type of FixedStringNBytes. |
Append<T>(ref T, int)
Appends a number (converted to UTF-8 characters) to this string.
Declaration
public static FormatError Append<T>(this ref T fs, int input) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | fs | A FixedStringNBytes. |
int | input | An int to append to the string. |
Returns
Type | Description |
---|---|
Format |
FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |
Type Parameters
Name | Description |
---|---|
T | The type of FixedStringNBytes. |
Append<T>(ref T, ulong)
Appends a number (converted to UTF-8 characters) to this string.
Declaration
public static FormatError Append<T>(this ref T fs, ulong input) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | fs | A FixedStringNBytes. |
ulong | input | A ulong integer to append to the string. |
Returns
Type | Description |
---|---|
Format |
FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |
Type Parameters
Name | Description |
---|---|
T | The type of FixedStringNBytes. |
Append<T>(ref T, uint)
Appends a number (converted to UTF-8 characters) to this string.
Declaration
public static FormatError Append<T>(this ref T fs, uint input) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | fs | A FixedStringNBytes. |
uint | input | A uint to append to the string. |
Returns
Type | Description |
---|---|
Format |
FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |
Type Parameters
Name | Description |
---|---|
T | The type of FixedStringNBytes. |
Append<T>(ref T, float, char)
Appends a number (converted to UTF-8 characters) to this string.
Declaration
public static FormatError Append<T>(this ref T fs, float input, char decimalSeparator = '.') where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | fs | A FixedStringNBytes. |
float | input | A float to append to the string. |
char | decimalSeparator | The character to use as the decimal separator. Defaults to a period ('.'). |
Returns
Type | Description |
---|---|
Format |
FormatError.None if successful. Returns FormatError.Overflow if the capacity of the string is exceeded. |
Type Parameters
Name | Description |
---|---|
T | The type of FixedStringNBytes. |
Append<T, T2>(ref T, in T2)
Appends another string to this string.
Declaration
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
Type | Name | Description |
---|---|---|
T | fs | The destination string. |
T2 | input | The source string. |
Returns
Type | Description |
---|---|
Format |
FormatError.None if successful. Returns FormatError.Overflow if the capacity of the destination string is exceeded. |
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.
Append<T>(ref T, byte*, int)
Appends bytes to this string.
Declaration
public static FormatError Append<T>(this ref T fs, byte* utf8Bytes, int utf8BytesLength) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | fs | The destination string. |
byte* | utf8Bytes | The bytes to append. |
int | utf8BytesLength | The number of bytes to append. |
Returns
Type | Description |
---|---|
Format |
FormatError.None if successful. Returns FormatError.Overflow if the capacity of the destination string is exceeded. |
Type Parameters
Name | Description |
---|---|
T | The type of the destination string. |
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>(ref T, string)
Appends another string to this string.
Declaration
[ExcludeFromBurstCompatTesting("Takes managed string")]
public static FormatError Append<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 string to append. |
Returns
Type | Description |
---|---|
Format |
FormatError.None if successful. Returns FormatError.Overflow if the capacity of the destination string is exceeded. |
Type Parameters
Name | Description |
---|---|
T | The type of the destination string. |
Remarks
When the method returns an error, the destination string is not modified.