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

◆ GetNonVirtualStringBytes()

unsafe byte[] System.Reflection.Metadata.Ecma335.StringHeap.GetNonVirtualStringBytes ( StringHandle handle,
byte[] prefix )
inlineprivate

Definition at line 92 of file StringHeap.cs.

93 {
94 MemoryBlock nonVirtualStringMemoryBlock = GetNonVirtualStringMemoryBlock(handle);
95 byte[] array = new byte[prefix.Length + nonVirtualStringMemoryBlock.Length];
96 Buffer.BlockCopy(prefix, 0, array, 0, prefix.Length);
97 Marshal.Copy((IntPtr)nonVirtualStringMemoryBlock.Pointer, array, prefix.Length, nonVirtualStringMemoryBlock.Length);
98 return array;
99 }
static void Copy(int[] source, int startIndex, IntPtr destination, int length)
Definition Marshal.cs:800
unsafe MemoryBlock GetNonVirtualStringMemoryBlock(StringHandle handle)
Definition StringHeap.cs:83

References System.array, System.Buffer.BlockCopy(), System.Runtime.InteropServices.Marshal.Copy(), System.Reflection.Metadata.Ecma335.StringHeap.GetNonVirtualStringMemoryBlock(), System.handle, System.Reflection.Internal.MemoryBlock.Length, System.Reflection.Internal.MemoryBlock.Pointer, and System.prefix.

Referenced by System.Reflection.Metadata.Ecma335.StringHeap.GetVirtualHandleMemoryBlock().