Struct TextRenderer.TextMemory ​
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Text for a TextRenderer.TextRenderRequest. 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 TextRenderer.Render(Camera, RenderTexture?) runs.
public readonly struct TextRenderer.TextMemoryProperties ​
Length ​
Gets the number of characters.
public int Length { get; }Property Value ​
int
Span ​
Gets the characters as a span.
public ReadOnlySpan<char> Span { get; }Property Value ​
ReadOnlySpan<char>
Methods ​
Format(Memory<char>, ref FormatHandler) ​
Formats an interpolated string with the invariant culture directly into a caller-owned buffer and wraps the written slice, without allocating. Text that does not fit the buffer comes out empty.
public static TextRenderer.TextMemory Format(Memory<char> destination, ref TextRenderer.TextMemory.FormatHandler handler)Parameters ​
destination Memory<char>
handler TextRenderer.TextMemory.FormatHandler
Returns ​
Operators ​
implicit operator TextMemory(string?) ​
Wraps a string.
public static implicit operator TextRenderer.TextMemory(string? text)Parameters ​
text string?
Returns ​
implicit operator TextMemory(ReadOnlyMemory<char>) ​
Wraps a caller-owned buffer slice.
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.
public static implicit operator TextRenderer.TextMemory(Memory<char> memory)Parameters ​
memory Memory<char>

