Class SeStringBuilderExtensions
Extension methods for SeStringBuilder.
Assembly: Dalamud.dll
public static class SeStringBuilderExtensions
Methods
ContainsText(SeStringBuilder, ReadOnlySpan<byte>)
Determines whether the Lumina.Text.SeStringBuilder contains the specified text.
public static bool ContainsText(this SeStringBuilder builder, ReadOnlySpan<byte> needle)
Returns
System.Boolean: true if the text is found; otherwise, false.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder | builder | The builder to search. |
System.ReadOnlySpan<System.Byte> | needle | The text to find. |
ReplaceText(ReadOnlySeString, ReadOnlySpan<byte>, ReadOnlySpan<byte>)
Replaces occurrences of a specified text in a Lumina.Text.ReadOnly.ReadOnlySeString with another text.
public static ReadOnlySeString ReplaceText(this ReadOnlySeString ross, ReadOnlySpan<byte> toFind, ReadOnlySpan<byte> replacement)
Returns
Lumina.Text.ReadOnly.ReadOnlySeString: A new Lumina.Text.ReadOnly.ReadOnlySeString with the replacements made.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.ReadOnly.ReadOnlySeString | ross | The original string. |
System.ReadOnlySpan<System.Byte> | toFind | The text to find. |
System.ReadOnlySpan<System.Byte> | replacement | The replacement text. |
ReplaceText(SeStringBuilder, ReadOnlySpan<byte>, ReadOnlySpan<byte>)
Replaces occurrences of a specified text in an Lumina.Text.SeStringBuilder with another text.
public static void ReplaceText(this SeStringBuilder builder, ReadOnlySpan<byte> toFind, ReadOnlySpan<byte> replacement)
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder | builder | The builder to modify. |
System.ReadOnlySpan<System.Byte> | toFind | The text to find. |
System.ReadOnlySpan<System.Byte> | replacement | The replacement text. |
PushDalamudLink(SeStringBuilder, uint, string, int, int, string)
Appends a custom Dalamud link macro to the string builder.
public static SeStringBuilder PushDalamudLink(this SeStringBuilder builder, uint commandId, string pluginName, int extra1, int extra2, string extraString)
Returns
Lumina.Text.SeStringBuilder: The Lumina.Text.SeStringBuilder instance for fluent chaining.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder | builder | The builder instance to append to. |
System.UInt32 | commandId | The custom command id to trigger upon interaction. |
System.String | pluginName | The internal name of the plugin handling the link. |
System.Int32 | extra1 | An optional user-defined integer parameter passed to the click handler. |
System.Int32 | extra2 | An optional second user-defined integer parameter passed to the click handler. |
System.String | extraString | An optional user-defined string parameter passed to the click handler. |
PushDalamudLink(SeStringBuilder, DalamudLinkPayload)
Appends a custom Dalamud link macro to the string builder.
public static SeStringBuilder PushDalamudLink(this SeStringBuilder builder, DalamudLinkPayload payload)
Returns
Lumina.Text.SeStringBuilder: The Lumina.Text.SeStringBuilder instance for fluent chaining.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder | builder | The builder instance to append to. |
| Dalamud.Game.Text.DalamudLinkPayload | payload | The link payload containing handler and custom parameter data. |
PushItemLink(SeStringBuilder, uint, string?)
Appends a formatted item link payload using a combined raw item Id.
public static SeStringBuilder PushItemLink(this SeStringBuilder builder, uint itemId, string? displayNameOverride = null)
Returns
Lumina.Text.SeStringBuilder: The Lumina.Text.SeStringBuilder instance with the item link appended for method chaining.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder | builder | The builder to append the item link to. |
System.UInt32 | itemId | The Id of the Item or EventItem to link. Automatically extracted into its base Id and Dalamud.Utility.ItemKind. |
System.String | displayNameOverride | An optional name override to display instead of the actual item name. |
PushItemLink(SeStringBuilder, uint, ItemKind, string?)
Appends a formatted item link payload.
public static SeStringBuilder PushItemLink(this SeStringBuilder builder, uint baseItemId, ItemKind itemKind, string? displayNameOverride = null)
Returns
Lumina.Text.SeStringBuilder: The Lumina.Text.SeStringBuilder instance with the item link appended for method chaining.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder | builder | The builder to append the item link to. |
System.UInt32 | baseItemId | The base Id of the item to link. |
| Dalamud.Utility.ItemKind | itemKind | The Dalamud.Utility.ItemKind variant of the item (e.g., normal, high-quality, collectable). |
System.String | displayNameOverride | An optional name override to display instead of the actual item name. |
PushItemLink(SeStringBuilder, Item, bool, string?)
Appends a formatted item link payload.
public static SeStringBuilder PushItemLink(this SeStringBuilder builder, Item item, bool isHq, string? displayNameOverride = null)
Returns
Lumina.Text.SeStringBuilder: The Lumina.Text.SeStringBuilder instance with the item link appended for method chaining.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder | builder | The builder to append the item link to. |
Lumina.Excel.Sheets.Item | item | The Lumina Lumina.Excel.Sheets.Item data object to link. |
System.Boolean | isHq | Whether to link the high-quality variant of the item. |
System.String | displayNameOverride | An optional name override to display instead of the actual item name. |
PushMapLink(SeStringBuilder, IGameObject)
Appends a formatted map link payload for the position of a Dalamud.Game.ClientState.Objects.Types.IGameObject.
public static SeStringBuilder PushMapLink(this SeStringBuilder builder, IGameObject obj)
Returns
Lumina.Text.SeStringBuilder: The Lumina.Text.SeStringBuilder instance with the map link appended for method chaining.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder | builder | The builder to append the map link to. |
| Dalamud.Game.ClientState.Objects.Types.IGameObject | obj | The game object whose current position should be linked. |
PushMapLink(SeStringBuilder, uint, uint, float, float, float, int, float)
Appends a formatted map link payload.
public static SeStringBuilder PushMapLink(this SeStringBuilder builder, uint territoryId, uint mapId, float xCoord, float yCoord, float zCoord = 0, int instanceId = 0, float fudgeFactor = 0.05)
Returns
Lumina.Text.SeStringBuilder: The Lumina.Text.SeStringBuilder instance with the map link appended for method chaining.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder | builder | The builder to append the map link to. |
System.UInt32 | territoryId | The Id of the TerritoryType for this map link. |
System.UInt32 | mapId | The Id of the Map for this map link. |
System.Single | xCoord | The human-readable X-coordinate for this link. |
System.Single | yCoord | The human-readable Y-coordinate for this link. |
System.Single | zCoord | An optional human-readable Z-coordinate for this link. |
System.Int32 | instanceId | An optional area instance number to be included in this link. |
System.Single | fudgeFactor | An optional offset to account for rounding and truncation errors; it is best to leave this untouched in most cases. |
PushPartyFinderLink(SeStringBuilder, uint, string, bool)
Appends a formatted party finder listing link payload.
public static SeStringBuilder PushPartyFinderLink(this SeStringBuilder builder, uint listingId, string recruiterName, bool isCrossWorld = false)
Returns
Lumina.Text.SeStringBuilder: The Lumina.Text.SeStringBuilder instance with the party finder link appended for method chaining.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder | builder | The builder to append the party finder link to. |
System.UInt32 | listingId | The listing Id of the party finder entry. |
System.String | recruiterName | The name of the recruiter. |
System.Boolean | isCrossWorld | Whether the listing is limited to the current world or not. |
PushPartyFinderSearchConditionsLink(SeStringBuilder, string)
Appends a formatted party finder search conditions link payload.
public static SeStringBuilder PushPartyFinderSearchConditionsLink(this SeStringBuilder builder, string message)
Returns
Lumina.Text.SeStringBuilder: The Lumina.Text.SeStringBuilder instance with the search conditions link appended for method chaining.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Text.SeStringBuilder | builder | The builder to append the search conditions link to. |
System.String | message | The text that should be displayed for the link. |