Skip to main content

Class SeStringExtensions

Extension methods for SeStrings.

Assembly: Dalamud.dll
View Source
Declaration
public static class SeStringExtensions

Methods

ToDalamudString(SeString)

Convert a Lumina SeString into a Dalamud SeString. This conversion re-parses the string.

View Source
Declaration
public static SeString ToDalamudString(this SeString originalString)
Returns

Dalamud.Game.Text.SeStringHandling.SeString: The re-parsed Dalamud SeString.

Parameters
TypeNameDescription
Lumina.Text.SeStringoriginalStringThe original Lumina SeString.

AppendMacroString(SeStringBuilder, ReadOnlySpan<byte>)

Compiles and appends a macro string.

View Source
Declaration
public static SeStringBuilder AppendMacroString(this SeStringBuilder ssb, ReadOnlySpan<byte> macroString)
Returns

Lumina.Text.SeStringBuilder: this for method chaining.

Parameters
TypeNameDescription
Lumina.Text.SeStringBuilderssbTarget SeString builder.
System.ReadOnlySpan<System.Byte>macroStringMacro 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
Declaration
public static SeStringBuilder AppendMacroString(this SeStringBuilder ssb, ReadOnlySpan<char> macroString)
Returns

Lumina.Text.SeStringBuilder: this for method chaining.

Parameters
TypeNameDescription
Lumina.Text.SeStringBuilderssbTarget SeString builder.
System.ReadOnlySpan<System.Char>macroStringMacro 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
Declaration
public static SeStringBuilder AppendMacroString(this SeStringBuilder ssb, ReadOnlySpan<byte> macroString)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: this for method chaining.

Parameters
TypeNameDescription
Dalamud.Game.Text.SeStringHandling.SeStringBuilderssbTarget SeString builder.
System.ReadOnlySpan<System.Byte>macroStringMacro 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
Declaration
public static SeStringBuilder AppendMacroString(this SeStringBuilder ssb, ReadOnlySpan<char> macroString)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: this for method chaining.

Parameters
TypeNameDescription
Dalamud.Game.Text.SeStringHandling.SeStringBuilderssbTarget SeString builder.
System.ReadOnlySpan<System.Char>macroStringMacro 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
Declaration
public static bool IsValidCharacterName(this SeString value)
Returns

System.Boolean: indicator if character is name is valid.

Parameters
TypeNameDescription
Dalamud.Game.Text.SeStringHandling.SeStringvaluecharacter name to validate.