Struct TextRenderer.TextMemory ​
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Text for a . Converts implicitly from a string, or from a caller-owned char buffer slice to render without allocating — in which case the buffer must not be overwritten until runs.
csharp
public readonly struct TextRenderer.TextMemoryProperties ​
Length ​
Gets the number of characters.
csharp
public int Length { get; }Property Value ​
Span ​
Gets the characters as a span.
csharp
public ReadOnlySpan<char> Span { get; }Property Value ​
Methods ​
Format(Memory<char>, ref FormatHandler) ​
Formats an interpolated string directly into a caller-owned buffer and wraps the written slice, without allocating. Text that does not fit the buffer comes out empty.
csharp
public static TextRenderer.TextMemory Format(Memory<char> destination, ref TextRenderer.TextMemory.FormatHandler handler)Parameters ​
handler TextRenderer.TextMemory.FormatHandler
Returns ​
Operators ​
implicit operator TextMemory(string?) ​
Wraps a string.
csharp
public static implicit operator TextRenderer.TextMemory(string? text)Parameters ​
text string?
Returns ​
implicit operator TextMemory(ReadOnlyMemory<char>) ​
Wraps a caller-owned buffer slice.
csharp
public static implicit operator TextRenderer.TextMemory(ReadOnlyMemory<char> memory)Parameters ​
memory ReadOnlyMemory<char>
Returns ​
implicit operator TextMemory(Memory<char>) ​
Wraps a caller-owned buffer slice.
csharp
public static implicit operator TextRenderer.TextMemory(Memory<char> memory)
