Show / Hide Table of Contents

# Class SeString

This class represents a parsed SeString.

##### Inheritance

System.Object
SeString

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)

###### Namespace: Dalamud.Game.Text.SeStringHandling

###### Assembly: Dalamud.dll

##### Syntax

    public class SeString

### Constructors

| Improve this Doc View Source

#### SeString()

Initializes a new instance of the SeString class. Creates a new SeString from an ordered list of payloads.

##### Declaration

    public SeString()

| Improve this Doc View Source

#### SeString(Payload[])

Initializes a new instance of the SeString class. Creates a new SeString from an ordered list of payloads.

##### Declaration

    public SeString(params Payload[] payloads)

##### Parameters

Type | Name | Description
--- | --- | ---
Payload[] | payloads | The Payload objects to make up this string.

| Improve this Doc View Source

#### SeString(List<Payload>)

Initializes a new instance of the SeString class. Creates a new SeString from an ordered list of payloads.

##### Declaration

    [JsonConstructor]
    public SeString(List<Payload> payloads)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Collections.Generic.List<Payload> | payloads | The Payload objects to make up this string.

### Properties

| Improve this Doc View Source

#### Empty

Gets an empty SeString.

##### Declaration

    public static SeString Empty { get; }

##### Property Value

Type | Description
--- | ---
SeString |

| Improve this Doc View Source

#### Payloads

Gets the ordered list of payloads included in this SeString.

##### Declaration

    public List<Payload> Payloads { get; }

##### Property Value

Type | Description
--- | ---
System.Collections.Generic.List<Payload> |

| Improve this Doc View Source

#### TextArrowPayloads

Gets a list of Payloads necessary to display the arrow link marker icon in chat with the appropriate glow and coloring.

##### Declaration

    public static IEnumerable<Payload> TextArrowPayloads { get; }

##### Property Value

Type | Description
--- | ---
System.Collections.Generic.IEnumerable<Payload> | A list of all the payloads required to insert the link marker.

| Improve this Doc View Source

#### TextValue

Gets all of the raw text from a message as a single joined string.

##### Declaration

    public string TextValue { get; }

##### Property Value

Type | Description
--- | ---
System.String | All the raw text from the contained payloads, joined into a single string.

### Methods

| Improve this Doc View Source

#### Append(Payload)

Appends a single payload to this SeString.

##### Declaration

    public SeString Append(Payload payload)

##### Parameters

Type | Name | Description
--- | --- | ---
Payload | payload | The payload to append.

##### Returns

Type | Description
--- | ---
SeString | This object.

| Improve this Doc View Source

#### Append(SeString)

Appends the contents of one SeString to this one.

##### Declaration

    public SeString Append(SeString other)

##### Parameters

Type | Name | Description
--- | --- | ---
SeString | other | The SeString to append to this one.

##### Returns

Type | Description
--- | ---
SeString | This object.

| Improve this Doc View Source

#### Append(List<Payload>)

Appends a list of payloads to this SeString.

##### Declaration

    public SeString Append(List<Payload> payloads)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Collections.Generic.List<Payload> | payloads | The Payloads to append.

##### Returns

Type | Description
--- | ---
SeString | This object.

| Improve this Doc View Source

#### CreateItemLink(Item, Boolean, String)

Creates an SeString representing an entire Payload chain that can be used to link an item in the chat log.

##### Declaration

    public static SeString CreateItemLink(Item item, bool isHq, string displayNameOverride = null)

##### Parameters

Type | Name | Description
--- | --- | ---
Lumina.Excel.GeneratedSheets.Item | item | The Lumina Item 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.

##### Returns

Type | Description
--- | ---
SeString | An SeString containing all the payloads necessary to display an item link in the chat log.

| Improve this Doc View Source

#### CreateItemLink(UInt32, ItemPayload.ItemKind, String)

Creates an SeString representing an entire Payload chain that can be used to link an item in the chat log.

##### Declaration

    public static SeString CreateItemLink(uint itemId, ItemPayload.ItemKind kind = ItemPayload.ItemKind.Normal, string displayNameOverride = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt32 | itemId | The id of the item to link.
ItemPayload.ItemKind | kind | The kind of item to link.
System.String | displayNameOverride | An optional name override to display, instead of the actual item name.

##### Returns

Type | Description
--- | ---
SeString | An SeString containing all the payloads necessary to display an item link in the chat log.

| Improve this Doc View Source

#### CreateItemLink(UInt32, Boolean, String)

Creates an SeString representing an entire Payload chain that can be used to link an item in the chat log.

##### Declaration

    public static SeString CreateItemLink(uint itemId, bool isHq, string displayNameOverride = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt32 | itemId | The id of the item 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.

##### Returns

Type | Description
--- | ---
SeString | An SeString containing all the payloads necessary to display an item link in the chat log.

| Improve this Doc View Source

#### CreateMapLink(String, Single, Single, Single)

Creates an SeString representing an entire Payload chain that can be used to link a map position in the chat log, matching a specified zone name. Returns null if no corresponding PlaceName was found.

##### Declaration

    public static SeString CreateMapLink(string placeName, float xCoord, float yCoord, float fudgeFactor = 0.05F)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | placeName | The name of the location for this link. This should be exactly the name as seen in a displayed map link in-game for the same zone.
System.Single | xCoord | The human-readable x-coordinate for this link.
System.Single | yCoord | The human-readable y-coordinate for 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.

##### Returns

Type | Description
--- | ---
SeString | An SeString containing all of the payloads necessary to display a map link in the chat log.

| Improve this Doc View Source

#### CreateMapLink(UInt32, UInt32, Int32, Int32)

Creates an SeString representing an entire Payload chain that can be used to link a map position in the chat log.

##### Declaration

    public static SeString CreateMapLink(uint territoryId, uint mapId, int rawX, int rawY)

##### Parameters

Type | Name | Description
--- | --- | ---
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.Int32 | rawX | The raw x-coordinate for this link.
System.Int32 | rawY | The raw y-coordinate for this link..

##### Returns

Type | Description
--- | ---
SeString | An SeString containing all of the payloads necessary to display a map link in the chat log.

| Improve this Doc View Source

#### CreateMapLink(UInt32, UInt32, Single, Single, Single)

Creates an SeString representing an entire Payload chain that can be used to link a map position in the chat log.

##### Declaration

    public static SeString CreateMapLink(uint territoryId, uint mapId, float xCoord, float yCoord, float fudgeFactor = 0.05F)

##### Parameters

Type | Name | Description
--- | --- | ---
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 | fudgeFactor | An optional offset to account for rounding and truncation errors; it is best to leave this untouched in most cases.

##### Returns

Type | Description
--- | ---
SeString | An SeString containing all of the payloads necessary to display a map link in the chat log.

| Improve this Doc View Source

#### Encode()

Encodes the Payloads in this SeString into a binary representation suitable for use by in-game handlers, such as the chat log.

##### Declaration

    public byte[] Encode()

##### Returns

Type | Description
--- | ---
System.Byte[] | The binary encoded payload data.

| Improve this Doc View Source

#### FromJson(String)

Creates a SeString from a json. (For testing - not recommended for production use.)

##### Declaration

    public static SeString FromJson(string json)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | json | A serialized SeString produced by ToJson() ToJson().

##### Returns

Type | Description
--- | ---
SeString | A SeString initialized with values from the json.

| Improve this Doc View Source

#### Parse(Byte*, Int32)

Parse a binary game message into an SeString.

##### Declaration

    public static SeString Parse(byte *ptr, int len)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Byte* | ptr | Pointer to the string's data in memory.
System.Int32 | len | Length of the string's data in memory.

##### Returns

Type | Description
--- | ---
SeString | An SeString containing parsed Payload objects for each payload in the data.

| Improve this Doc View Source

#### Parse(Byte[])

Parse a binary game message into an SeString.

##### Declaration

    public static SeString Parse(byte[] bytes)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Byte[] | bytes | Binary message payload data in SE's internal format.

##### Returns

Type | Description
--- | ---
SeString | An SeString containing parsed Payload objects for each payload in the data.

| Improve this Doc View Source

#### Parse(ReadOnlySpan<Byte>)

Parse a binary game message into an SeString.

##### Declaration

    public static SeString Parse(ReadOnlySpan<byte> data)

##### Parameters

Type | Name | Description
--- | --- | ---
System.ReadOnlySpan<System.Byte> | data | Binary message payload data in SE's internal format.

##### Returns

Type | Description
--- | ---
SeString | An SeString containing parsed Payload objects for each payload in the data.

| Improve this Doc View Source

#### ToJson()

Serializes the SeString to json.

##### Declaration

    public string ToJson()

##### Returns

Type | Description
--- | ---
System.String | An json representation of this object.

| Improve this Doc View Source

#### ToString()

Get the text value of this SeString.

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String | The TextValue property.

##### Overrides

System.Object.ToString()

### Operators

| Improve this Doc View Source

#### Explicit(SeString to SeString)

Implicitly convert a string into a SeString containing a TextPayload.

##### Declaration

    public static explicit operator SeString(SeString str)

##### Parameters

Type | Name | Description
--- | --- | ---
Lumina.Text.SeString | str | string to convert.

##### Returns

Type | Description
--- | ---
SeString | Equivalent SeString.

| Improve this Doc View Source

#### Implicit(String to SeString)

Implicitly convert a string into a SeString containing a TextPayload.

##### Declaration

    public static implicit operator SeString(string str)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | str | string to convert.

##### Returns

Type | Description
--- | ---
SeString | Equivalent SeString.