Struct RentedSeStringBuilder
Provides a temporarily rented Lumina.Text.SeStringBuilder from a shared pool.
Assembly: Dalamud.dll
public readonly struct RentedSeStringBuilder : IResettable, IDisposable
Implements:
Microsoft.Extensions.ObjectPool.IResettable, System.IDisposable
Properties
Builder
Gets the rented Lumina.Text.SeStringBuilder value from the shared pool.
public SeStringBuilder Builder { get; }
Methods
Dispose()
Returns the rented Lumina.Text.SeStringBuilder to the shared pool.
public void Dispose()
BeginMacro(MacroCode)
Begins a macro.
public SeStringBuilder BeginMacro(MacroCode macroCode)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.Payloads.MacroCode | macroCode | The macro code. |
EndMacro()
Ends a macro.
public SeStringBuilder EndMacro()
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the operation is completed.
AbortMacro()
Aborts a macro build by discarding the current macro data and exiting the macro scope.
public SeStringBuilder AbortMacro()
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the operation is completed.
Clear(bool)
Clears everything.
public SeStringBuilder Clear(bool zeroBuffer = false)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the clear operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Boolean | zeroBuffer | Whether to fill the underlying buffer with zeroes. |
GetViewAsMemory()
Gets the view of SeString being built.
public ReadOnlyMemory<byte> GetViewAsMemory()
Returns
System.ReadOnlyMemory<System.Byte>: View of the SeString being built.
Remarks
<p>Returned view is invalidated upon any mutation to this builder, including Lumina.Text.SeStringBuilder.Clear(System.Boolean) and Lumina.Text.SeStringBuilder.Append(System.String). If
Lumina.Text.SeStringBuilder.SharedPool is being used, then returning to the pool also will invalidate the returned view.</p>
<p>After the last element (right after the end of the returned memory/span), NUL is present. You can pin the returned value and use the pointer
to the first element as a pointer to null-terminated string.</p>
GetViewAsSpan()
Gets the view of SeString being built.
public ReadOnlySpan<byte> GetViewAsSpan()
Returns
System.ReadOnlySpan<System.Byte>: View of the SeString being built.
Remarks
<p>Returned view is invalidated upon any mutation to this builder, including Lumina.Text.SeStringBuilder.Clear(System.Boolean) and Lumina.Text.SeStringBuilder.Append(System.String). If
Lumina.Text.SeStringBuilder.SharedPool is being used, then returning to the pool also will invalidate the returned view.</p>
<p>After the last element (right after the end of the returned memory/span), NUL is present. You can pin the returned value and use the pointer
to the first element as a pointer to null-terminated string.</p>
ToArray()
Gets the SeString as a new byte array.
public byte[] ToArray()
Returns
System.Byte[]: A new byte array.
Remarks
If the created value does not escape the code scope this function is being called, consider using Lumina.Text.SeStringBuilder.GetViewAsMemory or
Lumina.Text.SeStringBuilder.GetViewAsSpan.
ToReadOnlySeString()
Gets the SeString as a new instance of Lumina.Text.ReadOnly.ReadOnlySeString.
public ReadOnlySeString ToReadOnlySeString()
Returns
Lumina.Text.ReadOnly.ReadOnlySeString: A new instance of Lumina.Text.ReadOnly.ReadOnlySeString.
Remarks
If the created value does not escape the code scope this function is being called, consider using Lumina.Text.SeStringBuilder.GetViewAsMemory or
Lumina.Text.SeStringBuilder.GetViewAsSpan.
TryReset()
Reset the object to a neutral state, semantically similar to when the object was first constructed.
public bool TryReset()
Returns
System.Boolean: true if the object was able to reset itself, otherwise false.
Remarks
In general, this method is not expected to be thread-safe.
Append(ReadOnlySpan<char>)
Adds the given UTF-16 char sequence.
public SeStringBuilder Append(ReadOnlySpan<char> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlySpan<System.Char> | value | Text to add. |
Append(Span<char>)
Adds the given UTF-16 char sequence.
public SeStringBuilder Append(Span<char> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Span<System.Char> | value | Text to add. |
Append(ReadOnlyMemory<char>)
Adds the given UTF-16 char sequence.
public SeStringBuilder Append(ReadOnlyMemory<char> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlyMemory<System.Char> | value | Text to add. |
Append(Memory<char>)
Adds the given UTF-16 char sequence.
public SeStringBuilder Append(Memory<char> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Memory<System.Char> | value | Text to add. |
Append(char[])
Adds the given UTF-16 char sequence.
public SeStringBuilder Append(char[] value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Char[] | value | Text to add. |
Append(char[], int, int)
Adds the given UTF-16 char sequence.
public SeStringBuilder Append(char[] value, int startIndex, int count)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Char[] | value | Text to add. |
System.Int32 | startIndex | The starting position of the substring within <code class="paramref">value</code>. |
System.Int32 | count | The number of characters in <code class="paramref">value</code> to append. |
Append(string?)
Adds the given UTF-16 char sequence.
public SeStringBuilder Append(string? value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | value | Text to add. |
Append(string?, int, int)
Adds the given UTF-16 char sequence.
public SeStringBuilder Append(string? value, int startIndex, int count)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | value | Text to add. |
System.Int32 | startIndex | The starting position of the substring within <code class="paramref">value</code>. |
System.Int32 | count | The number of characters in <code class="paramref">value</code> to append. |
Append(SeStringInterpolatedStringHandler)
Adds the specified interpolated string.
public SeStringBuilder Append(SeStringBuilder.SeStringInterpolatedStringHandler handler)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder.SeStringInterpolatedStringHandler | handler | Interpolated string to append. |
Append(IFormatProvider?, SeStringInterpolatedStringHandler)
Adds the specified interpolated string.
public SeStringBuilder Append(IFormatProvider? provider, SeStringBuilder.SeStringInterpolatedStringHandler handler)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.IFormatProvider | provider | An object that supplies culture-specific formatting information. |
Lumina.Text.SeStringBuilder.SeStringInterpolatedStringHandler | handler | Interpolated string to append. |
Append(ReadOnlySpan<byte>)
Adds the given UTF-8 byte sequence.
public SeStringBuilder Append(ReadOnlySpan<byte> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlySpan<System.Byte> | value | Text to add. |
Append(Span<byte>)
Adds the given UTF-8 byte sequence.
public SeStringBuilder Append(Span<byte> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Span<System.Byte> | value | Text to add. |
Append(ReadOnlyMemory<byte>)
Adds the given UTF-8 byte sequence.
public SeStringBuilder Append(ReadOnlyMemory<byte> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlyMemory<System.Byte> | value | Text to add. |
Append(Memory<byte>)
Adds the given UTF-8 byte sequence.
public SeStringBuilder Append(Memory<byte> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Memory<System.Byte> | value | Text to add. |
Append(byte[])
Adds the given UTF-8 byte sequence.
public SeStringBuilder Append(byte[] value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte[] | value | Text to add. |
Append(byte[], int, int)
Adds the given UTF-8 byte sequence.
public SeStringBuilder Append(byte[] value, int startIndex, int count)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte[] | value | Text to add. |
System.Int32 | startIndex | The starting position of the substring within <code class="paramref">value</code>. |
System.Int32 | count | The number of characters in <code class="paramref">value</code> to append. |
Append(StringBuilder)
Adds the given SeString from the given StringBuilder.
public SeStringBuilder Append(StringBuilder value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Text.StringBuilder | value | The string builder that contains the substring to append. |
Append(StringBuilder, int, int)
Adds the given SeString from the given StringBuilder.
public SeStringBuilder Append(StringBuilder value, int startIndex, int count)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Text.StringBuilder | value | The string builder that contains the substring to append. |
System.Int32 | startIndex | The starting position of the substring within <code class="paramref">value</code>. |
System.Int32 | count | The number of characters in <code class="paramref">value</code> to append. |
Append(ReadOnlySeString)
Adds the given SeString.
public SeStringBuilder Append(ReadOnlySeString value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.ReadOnly.ReadOnlySeString | value | Text to add. |
Append(ReadOnlySeStringSpan)
Adds the given SeString.
public SeStringBuilder Append(ReadOnlySeStringSpan value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.ReadOnly.ReadOnlySeStringSpan | value | Text to add. |
Append(ReadOnlySePayload)
Adds the given SeString payload, wrapping in envelope as needed.
public SeStringBuilder Append(ReadOnlySePayload value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.ReadOnly.ReadOnlySePayload | value | Payload to add. |
Append(ReadOnlySePayloadSpan)
Adds the given SeString payload, wrapping in envelope as needed.
public SeStringBuilder Append(ReadOnlySePayloadSpan value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.ReadOnly.ReadOnlySePayloadSpan | value | Payload to add. |
Append(scoped in UtfEnumerator)
Appends the yielded characters from a Lumina.Text.UtfEnumerator.
public SeStringBuilder Append(scoped in UtfEnumerator enumerator)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.UtfEnumerator | enumerator | Enumerator to append text from. |
AppendChar(int)
Adds the given character, or System.Text.Rune.ReplacementChar if the value is not valid.
public SeStringBuilder AppendChar(int codepoint)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | codepoint | Character to add. |
AppendChar(uint)
Adds the given character.
public SeStringBuilder AppendChar(uint codepoint)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | codepoint | Character to add. |
AppendMacroString(ReadOnlySpan<byte>, scoped in MacroStringParseOptions)
Adds the given value after parsing it as a macro string.
public SeStringBuilder AppendMacroString(ReadOnlySpan<byte> value, scoped in MacroStringParseOptions parseOptions = default)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlySpan<System.Byte> | value | String to parse and add. |
Lumina.Text.Parse.MacroStringParseOptions | parseOptions | Parse options for . Defaults to interpreting <code class="paramref">value</code> as UTF-8. |
AppendMacroString(ReadOnlySpan<char>, scoped in MacroStringParseOptions)
Adds the given value after parsing it as a macro string.
public SeStringBuilder AppendMacroString(ReadOnlySpan<char> value, scoped in MacroStringParseOptions parseOptions = default)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlySpan<System.Char> | value | String to parse and add. |
Lumina.Text.Parse.MacroStringParseOptions | parseOptions | Parse options for . Defaults to interpreting <code class="paramref">value</code> as UTF-16. |
AppendLine(ReadOnlySpan<char>)
Adds the given UTF-16 char sequence and a line break.
public SeStringBuilder AppendLine(ReadOnlySpan<char> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlySpan<System.Char> | value | Text to add. |
AppendLine(Span<char>)
Adds the given UTF-16 char sequence and a line break.
public SeStringBuilder AppendLine(Span<char> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Span<System.Char> | value | Text to add. |
AppendLine(ReadOnlyMemory<char>)
Adds the given UTF-16 char sequence and a line break.
public SeStringBuilder AppendLine(ReadOnlyMemory<char> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlyMemory<System.Char> | value | Text to add. |
AppendLine(Memory<char>)
Adds the given UTF-16 char sequence and a line break.
public SeStringBuilder AppendLine(Memory<char> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Memory<System.Char> | value | Text to add. |
AppendLine(char[])
Adds the given UTF-16 char sequence and a line break.
public SeStringBuilder AppendLine(char[] value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Char[] | value | Text to add. |
AppendLine(char[], int, int)
Adds the given UTF-16 char sequence and a line break.
public SeStringBuilder AppendLine(char[] value, int startIndex, int count)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Char[] | value | Text to add. |
System.Int32 | startIndex | The starting position of the substring within <code class="paramref">value</code>. |
System.Int32 | count | The number of characters in <code class="paramref">value</code> to append. |
AppendLine(string?)
Adds the given UTF-16 char sequence and a line break.
public SeStringBuilder AppendLine(string? value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | value | Text to add. |
AppendLine(string?, int, int)
Adds the given UTF-16 char sequence and a line break.
public SeStringBuilder AppendLine(string? value, int startIndex, int count)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | value | Text to add. |
System.Int32 | startIndex | The starting position of the substring within <code class="paramref">value</code>. |
System.Int32 | count | The number of characters in <code class="paramref">value</code> to append. |
AppendLine(SeStringInterpolatedStringHandler)
Adds the specified interpolated string.
public SeStringBuilder AppendLine(SeStringBuilder.SeStringInterpolatedStringHandler handler)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder.SeStringInterpolatedStringHandler | handler | Interpolated string to append. |
AppendLine(IFormatProvider?, SeStringInterpolatedStringHandler)
Adds the specified interpolated string.
public SeStringBuilder AppendLine(IFormatProvider? provider, SeStringBuilder.SeStringInterpolatedStringHandler handler)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.IFormatProvider | provider | An object that supplies culture-specific formatting information. |
Lumina.Text.SeStringBuilder.SeStringInterpolatedStringHandler | handler | Interpolated string to append. |
AppendLine(ReadOnlySpan<byte>)
Adds the given UTF-8 byte sequence and a line break.
public SeStringBuilder AppendLine(ReadOnlySpan<byte> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlySpan<System.Byte> | value | Text to add. |
AppendLine(Span<byte>)
Adds the given UTF-8 byte sequence and a line break.
public SeStringBuilder AppendLine(Span<byte> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Span<System.Byte> | value | Text to add. |
AppendLine(ReadOnlyMemory<byte>)
Adds the given UTF-8 byte sequence and a line break.
public SeStringBuilder AppendLine(ReadOnlyMemory<byte> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlyMemory<System.Byte> | value | Text to add. |
AppendLine(Memory<byte>)
Adds the given UTF-8 byte sequence and a line break.
public SeStringBuilder AppendLine(Memory<byte> value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Memory<System.Byte> | value | Text to add. |
AppendLine(byte[])
Adds the given UTF-8 byte sequence and a line break.
public SeStringBuilder AppendLine(byte[] value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte[] | value | Text to add. |
AppendLine(byte[], int, int)
Adds the given UTF-8 byte sequence and a line break.
public SeStringBuilder AppendLine(byte[] value, int startIndex, int count)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte[] | value | Text to add. |
System.Int32 | startIndex | The starting position of the substring within <code class="paramref">value</code>. |
System.Int32 | count | The number of characters in <code class="paramref">value</code> to append. |
AppendLine(StringBuilder)
Adds the given SeString from the given StringBuilder and a line break.
public SeStringBuilder AppendLine(StringBuilder value)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Text.StringBuilder | value | The string builder that contains the substring to append. |
AppendLine(StringBuilder, int, int)
Adds the given SeString from the given StringBuilder and a line break.
public SeStringBuilder AppendLine(StringBuilder value, int startIndex, int count)
Returns
Lumina.Text.SeStringBuilder: A reference of this instance after the append operation is completed.
Parameters
| Type | Name | Description |
|---|---|---|
System.Text.StringBuilder | value | The string builder that contains the substring to append. |
System.Int32 | startIndex | The starting position of the substring within <code class="paramref">value</code>. |
System.Int32 | count | The number of characters in <code class="paramref">value</code> to append. |