Class CStringExtensions
A set of helpful utilities for working with InteropGenerator.Runtime.CStringPointer
s 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
Type | Name | Description |
---|---|---|
InteropGenerator.Runtime.CStringPointer | ptr | The 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
Type | Name | Description |
---|---|---|
InteropGenerator.Runtime.CStringPointer | ptr | The 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
Type | Name | Description |
---|---|---|
InteropGenerator.Runtime.CStringPointer | ptr | The 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
Type | Name | Description |
---|---|---|
InteropGenerator.Runtime.CStringPointer | ptr | The CStringPointer to process. |