Class SeStringExtensions
Extension methods for SeStrings.
Assembly: Dalamud.dll
View Source
public static class SeStringExtensions
Methods
ToDalamudString(SeString)
Convert a Lumina SeString into a Dalamud SeString. This conversion re-parses the string.
View Source
public static SeString ToDalamudString(this SeString originalString)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: The re-parsed Dalamud SeString.
Parameters
Type | Name | Description |
---|---|---|
Lumina.Text.SeString | originalString | The original Lumina SeString. |
AppendMacroString(SeStringBuilder, ReadOnlySpan<byte>)
Compiles and appends a macro string.
View Source
public static SeStringBuilder AppendMacroString(this SeStringBuilder ssb, ReadOnlySpan<byte> macroString)
Returns
Lumina.Text.SeStringBuilder
: this
for method chaining.
Parameters
Type | Name | Description |
---|---|---|
Lumina.Text.SeStringBuilder | ssb | Target SeString builder. |
System.ReadOnlySpan<System.Byte> | macroString | Macro string in UTF-8 to compile and append to <code class="paramref">ssb</code>. |
AppendMacroString(SeStringBuilder, ReadOnlySpan<char>)
Compiles and appends a macro string.
View Source
public static SeStringBuilder AppendMacroString(this SeStringBuilder ssb, ReadOnlySpan<char> macroString)
Returns
Lumina.Text.SeStringBuilder
: this
for method chaining.
Parameters
Type | Name | Description |
---|---|---|
Lumina.Text.SeStringBuilder | ssb | Target SeString builder. |
System.ReadOnlySpan<System.Char> | macroString | Macro string in UTF-16 to compile and append to <code class="paramref">ssb</code>. |
AppendMacroString(SeStringBuilder, ReadOnlySpan<byte>)
Compiles and appends a macro string.
View Source
public static SeStringBuilder AppendMacroString(this SeStringBuilder ssb, ReadOnlySpan<byte> macroString)
Returns
Dalamud.Game.Text.SeStringHandling.SeStringBuilder: this
for method chaining.
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Game.Text.SeStringHandling.SeStringBuilder | ssb | Target SeString builder. |
System.ReadOnlySpan<System.Byte> | macroString | Macro string in UTF-8 to compile and append to <code class="paramref">ssb</code>. |
AppendMacroString(SeStringBuilder, ReadOnlySpan<char>)
Compiles and appends a macro string.
View Source
public static SeStringBuilder AppendMacroString(this SeStringBuilder ssb, ReadOnlySpan<char> macroString)
Returns
Dalamud.Game.Text.SeStringHandling.SeStringBuilder: this
for method chaining.
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Game.Text.SeStringHandling.SeStringBuilder | ssb | Target SeString builder. |
System.ReadOnlySpan<System.Char> | macroString | Macro string in UTF-16 to compile and append to <code class="paramref">ssb</code>. |
IsValidCharacterName(SeString)
Validate if character name is valid. Both forename and surname must be between 2 and 15 characters and not total more than 20 characters combined. Only letters, hyphens, and apostrophes can be used. The first character of either name must be a letter. Hyphens cannot be used in succession or placed immediately before or after apostrophes.
View Source
public static bool IsValidCharacterName(this SeString value)
Returns
System.Boolean
: indicator if character is name is valid.
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Game.Text.SeStringHandling.SeString | value | character name to validate. |