Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ PtrToStringUTF8() [1/2]

static unsafe? string System.Runtime.InteropServices.Marshal.PtrToStringUTF8 ( IntPtr ptr)
inlinestatic

Definition at line 674 of file Marshal.cs.

675 {
676 if (IsNullOrWin32Atom(ptr))
677 {
678 return null;
679 }
680 int byteLength = string.strlen((byte*)(void*)ptr);
681 return string.CreateStringFromEncoding((byte*)(void*)ptr, byteLength, Encoding.UTF8);
682 }
static bool IsNullOrWin32Atom(IntPtr ptr)
Definition Marshal.cs:1602
static Encoding UTF8
Definition Encoding.cs:526

References System.Runtime.InteropServices.Marshal.IsNullOrWin32Atom(), and System.Text.Encoding.UTF8.