Skip to main content

Class CStringExtensions

A set of helpful utilities for working with InteropGenerator.Runtime.CStringPointers from ClientStructs.

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

Methods

AsReadOnlySeStringSpan(CStringPointer)

Convert a CStringPointer to a ReadOnlySeStringSpan.

View Source
Declaration
public static ReadOnlySeStringSpan AsReadOnlySeStringSpan(this CStringPointer ptr)
Returns

Lumina.Text.ReadOnly.ReadOnlySeStringSpan: A span.

Parameters
TypeNameDescription
InteropGenerator.Runtime.CStringPointerptrThe pointer to convert.

AsDalamudSeString(CStringPointer)

Convert a CStringPointer to a Dalamud SeString.

View Source
Declaration
public static SeString AsDalamudSeString(this CStringPointer ptr)
Returns

Dalamud.Game.Text.SeStringHandling.SeString: A Dalamud-flavored SeString.

Parameters
TypeNameDescription
InteropGenerator.Runtime.CStringPointerptrThe pointer to convert.

AsReadOnlySeString(CStringPointer)

Get a new ReadOnlySeString that's a <em>copy</em> of the text in this CStringPointer.

View Source
Declaration
public static ReadOnlySeString AsReadOnlySeString(this CStringPointer ptr)
Returns

Lumina.Text.ReadOnly.ReadOnlySeString: A new Lumina ReadOnlySeString.

Parameters
TypeNameDescription
InteropGenerator.Runtime.CStringPointerptrThe pointer to copy.

ExtractText(CStringPointer)

Extract text from this CStringPointer following Lumina.Text.ReadOnly.ReadOnlySeStringSpan.ExtractText's rules. Only useful for SeStrings.

View Source
Declaration
public static string ExtractText(this CStringPointer ptr)
Returns

System.String: Extracted text.

Parameters
TypeNameDescription
InteropGenerator.Runtime.CStringPointerptrThe CStringPointer to process.