Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryGetString()

static bool System.Runtime.InteropServices.MemoryMarshal.TryGetString ( ReadOnlyMemory< char > memory,
[NotNullWhen(true)] out string? text,
out int start,
out int length )
inlinestatic

Definition at line 228 of file MemoryMarshal.cs.

229 {
230 if (memory.GetObjectStartLength(out var start2, out var length2) is string text2)
231 {
232 text = text2;
233 start = start2;
234 length = length2;
235 return true;
236 }
237 text = null;
238 start = 0;
239 length = 0;
240 return false;
241 }

References System.length, System.length2, System.start, and System.text.

Referenced by System.Buffers.ReadOnlySequence< T >.ReadOnlySequence().