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

◆ ConvertToNative()

static unsafe byte System.StubHelpers.AnsiCharMarshaler.ConvertToNative ( char managedChar,
bool fBestFit,
bool fThrowOnUnmappableChar )
inlinestaticpackage

Definition at line 18 of file AnsiCharMarshaler.cs.

19 {
20 int num = 2 * Marshal.SystemMaxDBCSCharSize;
21 byte* ptr = stackalloc byte[(int)(uint)num];
22 int num2 = Marshal.StringToAnsiString(managedChar.ToString(), ptr, num, fBestFit, fThrowOnUnmappableChar);
23 return *ptr;
24 }
static unsafe int StringToAnsiString(string s, byte *buffer, int bufferLength, bool bestFit=false, bool throwOnUnmappableChar=false)
Definition Marshal.cs:1608
static readonly int SystemMaxDBCSCharSize
Definition Marshal.cs:19

References System.Runtime.InteropServices.Marshal.StringToAnsiString(), and System.Runtime.InteropServices.Marshal.SystemMaxDBCSCharSize.