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

◆ ConvertFixedToManaged()

static unsafe string System.StubHelpers.CSTRMarshaler.ConvertFixedToManaged ( IntPtr cstr,
int length )
inlinestaticpackage

Definition at line 99 of file CSTRMarshaler.cs.

100 {
101 int num = SpanHelpers.IndexOf(ref *(byte*)(void*)cstr, 0, length);
102 if (num != -1)
103 {
104 length = num;
105 }
106 return new string((sbyte*)(void*)cstr, 0, length);
107 }

References System.SpanHelpers.IndexOf(), and System.length.