// ------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using HexaGen.Runtime; using System.Numerics; namespace Dalamud.Bindings.ImGui { public unsafe partial class ImGuiP { /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static uint ImHashDataNative(void* data, ulong dataSize, uint seed) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[691])(data, dataSize, seed); #else return (uint)((delegate* unmanaged[Cdecl])funcTable[691])((nint)data, dataSize, seed); #endif } /// /// To be documented. /// public static uint ImHashData(void* data, ulong dataSize, uint seed) { uint ret = ImHashDataNative(data, dataSize, seed); return ret; } /// /// To be documented. /// public static uint ImHashData(void* data, ulong dataSize) { uint ret = ImHashDataNative(data, dataSize, (uint)(0)); return ret; } /// /// To be documented. /// public static uint ImHashData(void* data, nuint dataSize, uint seed) { uint ret = ImHashDataNative(data, dataSize, seed); return ret; } /// /// To be documented. /// public static uint ImHashData(void* data, nuint dataSize) { uint ret = ImHashDataNative(data, dataSize, (uint)(0)); return ret; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static uint ImHashStrNative(byte* data, ulong dataSize, uint seed) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[692])(data, dataSize, seed); #else return (uint)((delegate* unmanaged[Cdecl])funcTable[692])((nint)data, dataSize, seed); #endif } /// /// To be documented. /// public static uint ImHashStr(byte* data, ulong dataSize, uint seed) { uint ret = ImHashStrNative(data, dataSize, seed); return ret; } /// /// To be documented. /// public static uint ImHashStr(byte* data, ulong dataSize) { uint ret = ImHashStrNative(data, dataSize, (uint)(0)); return ret; } /// /// To be documented. /// public static uint ImHashStr(byte* data) { uint ret = ImHashStrNative(data, (ulong)(0), (uint)(0)); return ret; } /// /// To be documented. /// public static uint ImHashStr(byte* data, uint seed) { uint ret = ImHashStrNative(data, (ulong)(0), seed); return ret; } /// /// To be documented. /// public static uint ImHashStr(ref byte data, ulong dataSize, uint seed) { fixed (byte* pdata = &data) { uint ret = ImHashStrNative((byte*)pdata, dataSize, seed); return ret; } } /// /// To be documented. /// public static uint ImHashStr(ref byte data, ulong dataSize) { fixed (byte* pdata = &data) { uint ret = ImHashStrNative((byte*)pdata, dataSize, (uint)(0)); return ret; } } /// /// To be documented. /// public static uint ImHashStr(ref byte data) { fixed (byte* pdata = &data) { uint ret = ImHashStrNative((byte*)pdata, (ulong)(0), (uint)(0)); return ret; } } /// /// To be documented. /// public static uint ImHashStr(ref byte data, uint seed) { fixed (byte* pdata = &data) { uint ret = ImHashStrNative((byte*)pdata, (ulong)(0), seed); return ret; } } /// /// To be documented. /// public static uint ImHashStr(ReadOnlySpan data, ulong dataSize, uint seed) { fixed (byte* pdata = data) { uint ret = ImHashStrNative((byte*)pdata, dataSize, seed); return ret; } } /// /// To be documented. /// public static uint ImHashStr(ReadOnlySpan data, ulong dataSize) { fixed (byte* pdata = data) { uint ret = ImHashStrNative((byte*)pdata, dataSize, (uint)(0)); return ret; } } /// /// To be documented. /// public static uint ImHashStr(ReadOnlySpan data) { fixed (byte* pdata = data) { uint ret = ImHashStrNative((byte*)pdata, (ulong)(0), (uint)(0)); return ret; } } /// /// To be documented. /// public static uint ImHashStr(ReadOnlySpan data, uint seed) { fixed (byte* pdata = data) { uint ret = ImHashStrNative((byte*)pdata, (ulong)(0), seed); return ret; } } /// /// To be documented. /// public static uint ImHashStr(string data, ulong dataSize, uint seed) { byte* pStr0 = null; int pStrSize0 = 0; if (data != null) { pStrSize0 = Utils.GetByteCountUTF8(data); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(data, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } uint ret = ImHashStrNative(pStr0, dataSize, seed); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static uint ImHashStr(string data, ulong dataSize) { byte* pStr0 = null; int pStrSize0 = 0; if (data != null) { pStrSize0 = Utils.GetByteCountUTF8(data); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(data, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } uint ret = ImHashStrNative(pStr0, dataSize, (uint)(0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static uint ImHashStr(string data) { byte* pStr0 = null; int pStrSize0 = 0; if (data != null) { pStrSize0 = Utils.GetByteCountUTF8(data); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(data, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } uint ret = ImHashStrNative(pStr0, (ulong)(0), (uint)(0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static uint ImHashStr(string data, uint seed) { byte* pStr0 = null; int pStrSize0 = 0; if (data != null) { pStrSize0 = Utils.GetByteCountUTF8(data); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(data, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } uint ret = ImHashStrNative(pStr0, (ulong)(0), seed); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static uint ImHashStr(byte* data, nuint dataSize, uint seed) { uint ret = ImHashStrNative(data, dataSize, seed); return ret; } /// /// To be documented. /// public static uint ImHashStr(byte* data, nuint dataSize) { uint ret = ImHashStrNative(data, dataSize, (uint)(0)); return ret; } /// /// To be documented. /// public static uint ImHashStr(ref byte data, nuint dataSize, uint seed) { fixed (byte* pdata = &data) { uint ret = ImHashStrNative((byte*)pdata, dataSize, seed); return ret; } } /// /// To be documented. /// public static uint ImHashStr(ref byte data, nuint dataSize) { fixed (byte* pdata = &data) { uint ret = ImHashStrNative((byte*)pdata, dataSize, (uint)(0)); return ret; } } /// /// To be documented. /// public static uint ImHashStr(ReadOnlySpan data, nuint dataSize, uint seed) { fixed (byte* pdata = data) { uint ret = ImHashStrNative((byte*)pdata, dataSize, seed); return ret; } } /// /// To be documented. /// public static uint ImHashStr(ReadOnlySpan data, nuint dataSize) { fixed (byte* pdata = data) { uint ret = ImHashStrNative((byte*)pdata, dataSize, (uint)(0)); return ret; } } /// /// To be documented. /// public static uint ImHashStr(string data, nuint dataSize, uint seed) { byte* pStr0 = null; int pStrSize0 = 0; if (data != null) { pStrSize0 = Utils.GetByteCountUTF8(data); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(data, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } uint ret = ImHashStrNative(pStr0, dataSize, seed); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static uint ImHashStr(string data, nuint dataSize) { byte* pStr0 = null; int pStrSize0 = 0; if (data != null) { pStrSize0 = Utils.GetByteCountUTF8(data); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(data, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } uint ret = ImHashStrNative(pStr0, dataSize, (uint)(0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void ImQsortNative(void* baseValue, ulong count, ulong sizeOfElement, delegate*, int> compareFunc) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl], int>, void>)funcTable[693])(baseValue, count, sizeOfElement, compareFunc); #else ((delegate* unmanaged[Cdecl])funcTable[693])((nint)baseValue, count, sizeOfElement, (nint)compareFunc); #endif } /// /// To be documented. /// public static void ImQsort(void* baseValue, ulong count, ulong sizeOfElement, delegate*, int> compareFunc) { ImQsortNative(baseValue, count, sizeOfElement, compareFunc); } /// /// To be documented. /// public static void ImQsort(void* baseValue, nuint count, ulong sizeOfElement, delegate*, int> compareFunc) { ImQsortNative(baseValue, count, sizeOfElement, compareFunc); } /// /// To be documented. /// public static void ImQsort(void* baseValue, ulong count, nuint sizeOfElement, delegate*, int> compareFunc) { ImQsortNative(baseValue, count, sizeOfElement, compareFunc); } /// /// To be documented. /// public static void ImQsort(void* baseValue, nuint count, nuint sizeOfElement, delegate*, int> compareFunc) { ImQsortNative(baseValue, count, sizeOfElement, compareFunc); } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static uint ImAlphaBlendColorsNative(uint colA, uint colB) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[694])(colA, colB); #else return (uint)((delegate* unmanaged[Cdecl])funcTable[694])(colA, colB); #endif } /// /// To be documented. /// public static uint ImAlphaBlendColors(uint colA, uint colB) { uint ret = ImAlphaBlendColorsNative(colA, colB); return ret; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte ImIsPowerOfTwoNative(int v) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[695])(v); #else return (byte)((delegate* unmanaged[Cdecl])funcTable[695])(v); #endif } /// /// To be documented. /// public static bool ImIsPowerOfTwo(int v) { byte ret = ImIsPowerOfTwoNative(v); return ret != 0; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte ImIsPowerOfTwoNative(ulong v) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[696])(v); #else return (byte)((delegate* unmanaged[Cdecl])funcTable[696])(v); #endif } /// /// To be documented. /// public static bool ImIsPowerOfTwo(ulong v) { byte ret = ImIsPowerOfTwoNative(v); return ret != 0; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static int ImUpperPowerOfTwoNative(int v) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[697])(v); #else return (int)((delegate* unmanaged[Cdecl])funcTable[697])(v); #endif } /// /// To be documented. /// public static int ImUpperPowerOfTwo(int v) { int ret = ImUpperPowerOfTwoNative(v); return ret; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static int ImStricmpNative(byte* str1, byte* str2) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[698])(str1, str2); #else return (int)((delegate* unmanaged[Cdecl])funcTable[698])((nint)str1, (nint)str2); #endif } /// /// To be documented. /// public static int ImStricmp(byte* str1, byte* str2) { int ret = ImStricmpNative(str1, str2); return ret; } /// /// To be documented. /// public static int ImStricmp(ref byte str1, byte* str2) { fixed (byte* pstr1 = &str1) { int ret = ImStricmpNative((byte*)pstr1, str2); return ret; } } /// /// To be documented. /// public static int ImStricmp(ReadOnlySpan str1, byte* str2) { fixed (byte* pstr1 = str1) { int ret = ImStricmpNative((byte*)pstr1, str2); return ret; } } /// /// To be documented. /// public static int ImStricmp(string str1, byte* str2) { byte* pStr0 = null; int pStrSize0 = 0; if (str1 != null) { pStrSize0 = Utils.GetByteCountUTF8(str1); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImStricmpNative(pStr0, str2); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImStricmp(byte* str1, ref byte str2) { fixed (byte* pstr2 = &str2) { int ret = ImStricmpNative(str1, (byte*)pstr2); return ret; } } /// /// To be documented. /// public static int ImStricmp(byte* str1, ReadOnlySpan str2) { fixed (byte* pstr2 = str2) { int ret = ImStricmpNative(str1, (byte*)pstr2); return ret; } } /// /// To be documented. /// public static int ImStricmp(byte* str1, string str2) { byte* pStr0 = null; int pStrSize0 = 0; if (str2 != null) { pStrSize0 = Utils.GetByteCountUTF8(str2); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImStricmpNative(str1, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImStricmp(ref byte str1, ref byte str2) { fixed (byte* pstr1 = &str1) { fixed (byte* pstr2 = &str2) { int ret = ImStricmpNative((byte*)pstr1, (byte*)pstr2); return ret; } } } /// /// To be documented. /// public static int ImStricmp(ReadOnlySpan str1, ReadOnlySpan str2) { fixed (byte* pstr1 = str1) { fixed (byte* pstr2 = str2) { int ret = ImStricmpNative((byte*)pstr1, (byte*)pstr2); return ret; } } } /// /// To be documented. /// public static int ImStricmp(string str1, string str2) { byte* pStr0 = null; int pStrSize0 = 0; if (str1 != null) { pStrSize0 = Utils.GetByteCountUTF8(str1); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (str2 != null) { pStrSize1 = Utils.GetByteCountUTF8(str2); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(str2, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } int ret = ImStricmpNative(pStr0, pStr1); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImStricmp(ref byte str1, ReadOnlySpan str2) { fixed (byte* pstr1 = &str1) { fixed (byte* pstr2 = str2) { int ret = ImStricmpNative((byte*)pstr1, (byte*)pstr2); return ret; } } } /// /// To be documented. /// public static int ImStricmp(ref byte str1, string str2) { fixed (byte* pstr1 = &str1) { byte* pStr0 = null; int pStrSize0 = 0; if (str2 != null) { pStrSize0 = Utils.GetByteCountUTF8(str2); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImStricmpNative((byte*)pstr1, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImStricmp(ReadOnlySpan str1, ref byte str2) { fixed (byte* pstr1 = str1) { fixed (byte* pstr2 = &str2) { int ret = ImStricmpNative((byte*)pstr1, (byte*)pstr2); return ret; } } } /// /// To be documented. /// public static int ImStricmp(ReadOnlySpan str1, string str2) { fixed (byte* pstr1 = str1) { byte* pStr0 = null; int pStrSize0 = 0; if (str2 != null) { pStrSize0 = Utils.GetByteCountUTF8(str2); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImStricmpNative((byte*)pstr1, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImStricmp(string str1, ref byte str2) { byte* pStr0 = null; int pStrSize0 = 0; if (str1 != null) { pStrSize0 = Utils.GetByteCountUTF8(str1); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstr2 = &str2) { int ret = ImStricmpNative(pStr0, (byte*)pstr2); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImStricmp(string str1, ReadOnlySpan str2) { byte* pStr0 = null; int pStrSize0 = 0; if (str1 != null) { pStrSize0 = Utils.GetByteCountUTF8(str1); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstr2 = str2) { int ret = ImStricmpNative(pStr0, (byte*)pstr2); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static int ImStrnicmpNative(byte* str1, byte* str2, ulong count) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[699])(str1, str2, count); #else return (int)((delegate* unmanaged[Cdecl])funcTable[699])((nint)str1, (nint)str2, count); #endif } /// /// To be documented. /// public static int ImStrnicmp(byte* str1, byte* str2, ulong count) { int ret = ImStrnicmpNative(str1, str2, count); return ret; } /// /// To be documented. /// public static int ImStrnicmp(ref byte str1, byte* str2, ulong count) { fixed (byte* pstr1 = &str1) { int ret = ImStrnicmpNative((byte*)pstr1, str2, count); return ret; } } /// /// To be documented. /// public static int ImStrnicmp(ReadOnlySpan str1, byte* str2, ulong count) { fixed (byte* pstr1 = str1) { int ret = ImStrnicmpNative((byte*)pstr1, str2, count); return ret; } } /// /// To be documented. /// public static int ImStrnicmp(string str1, byte* str2, ulong count) { byte* pStr0 = null; int pStrSize0 = 0; if (str1 != null) { pStrSize0 = Utils.GetByteCountUTF8(str1); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImStrnicmpNative(pStr0, str2, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImStrnicmp(byte* str1, ref byte str2, ulong count) { fixed (byte* pstr2 = &str2) { int ret = ImStrnicmpNative(str1, (byte*)pstr2, count); return ret; } } /// /// To be documented. /// public static int ImStrnicmp(byte* str1, ReadOnlySpan str2, ulong count) { fixed (byte* pstr2 = str2) { int ret = ImStrnicmpNative(str1, (byte*)pstr2, count); return ret; } } /// /// To be documented. /// public static int ImStrnicmp(byte* str1, string str2, ulong count) { byte* pStr0 = null; int pStrSize0 = 0; if (str2 != null) { pStrSize0 = Utils.GetByteCountUTF8(str2); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImStrnicmpNative(str1, pStr0, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImStrnicmp(ref byte str1, ref byte str2, ulong count) { fixed (byte* pstr1 = &str1) { fixed (byte* pstr2 = &str2) { int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); return ret; } } } /// /// To be documented. /// public static int ImStrnicmp(ReadOnlySpan str1, ReadOnlySpan str2, ulong count) { fixed (byte* pstr1 = str1) { fixed (byte* pstr2 = str2) { int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); return ret; } } } /// /// To be documented. /// public static int ImStrnicmp(string str1, string str2, ulong count) { byte* pStr0 = null; int pStrSize0 = 0; if (str1 != null) { pStrSize0 = Utils.GetByteCountUTF8(str1); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (str2 != null) { pStrSize1 = Utils.GetByteCountUTF8(str2); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(str2, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } int ret = ImStrnicmpNative(pStr0, pStr1, count); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImStrnicmp(ref byte str1, ReadOnlySpan str2, ulong count) { fixed (byte* pstr1 = &str1) { fixed (byte* pstr2 = str2) { int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); return ret; } } } /// /// To be documented. /// public static int ImStrnicmp(ref byte str1, string str2, ulong count) { fixed (byte* pstr1 = &str1) { byte* pStr0 = null; int pStrSize0 = 0; if (str2 != null) { pStrSize0 = Utils.GetByteCountUTF8(str2); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImStrnicmpNative((byte*)pstr1, pStr0, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImStrnicmp(ReadOnlySpan str1, ref byte str2, ulong count) { fixed (byte* pstr1 = str1) { fixed (byte* pstr2 = &str2) { int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); return ret; } } } /// /// To be documented. /// public static int ImStrnicmp(ReadOnlySpan str1, string str2, ulong count) { fixed (byte* pstr1 = str1) { byte* pStr0 = null; int pStrSize0 = 0; if (str2 != null) { pStrSize0 = Utils.GetByteCountUTF8(str2); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImStrnicmpNative((byte*)pstr1, pStr0, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImStrnicmp(string str1, ref byte str2, ulong count) { byte* pStr0 = null; int pStrSize0 = 0; if (str1 != null) { pStrSize0 = Utils.GetByteCountUTF8(str1); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstr2 = &str2) { int ret = ImStrnicmpNative(pStr0, (byte*)pstr2, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImStrnicmp(string str1, ReadOnlySpan str2, ulong count) { byte* pStr0 = null; int pStrSize0 = 0; if (str1 != null) { pStrSize0 = Utils.GetByteCountUTF8(str1); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstr2 = str2) { int ret = ImStrnicmpNative(pStr0, (byte*)pstr2, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImStrnicmp(byte* str1, byte* str2, nuint count) { int ret = ImStrnicmpNative(str1, str2, count); return ret; } /// /// To be documented. /// public static int ImStrnicmp(ref byte str1, byte* str2, nuint count) { fixed (byte* pstr1 = &str1) { int ret = ImStrnicmpNative((byte*)pstr1, str2, count); return ret; } } /// /// To be documented. /// public static int ImStrnicmp(ReadOnlySpan str1, byte* str2, nuint count) { fixed (byte* pstr1 = str1) { int ret = ImStrnicmpNative((byte*)pstr1, str2, count); return ret; } } /// /// To be documented. /// public static int ImStrnicmp(string str1, byte* str2, nuint count) { byte* pStr0 = null; int pStrSize0 = 0; if (str1 != null) { pStrSize0 = Utils.GetByteCountUTF8(str1); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImStrnicmpNative(pStr0, str2, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImStrnicmp(byte* str1, ref byte str2, nuint count) { fixed (byte* pstr2 = &str2) { int ret = ImStrnicmpNative(str1, (byte*)pstr2, count); return ret; } } /// /// To be documented. /// public static int ImStrnicmp(byte* str1, ReadOnlySpan str2, nuint count) { fixed (byte* pstr2 = str2) { int ret = ImStrnicmpNative(str1, (byte*)pstr2, count); return ret; } } /// /// To be documented. /// public static int ImStrnicmp(byte* str1, string str2, nuint count) { byte* pStr0 = null; int pStrSize0 = 0; if (str2 != null) { pStrSize0 = Utils.GetByteCountUTF8(str2); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImStrnicmpNative(str1, pStr0, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImStrnicmp(ref byte str1, ref byte str2, nuint count) { fixed (byte* pstr1 = &str1) { fixed (byte* pstr2 = &str2) { int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); return ret; } } } /// /// To be documented. /// public static int ImStrnicmp(ReadOnlySpan str1, ReadOnlySpan str2, nuint count) { fixed (byte* pstr1 = str1) { fixed (byte* pstr2 = str2) { int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); return ret; } } } /// /// To be documented. /// public static int ImStrnicmp(string str1, string str2, nuint count) { byte* pStr0 = null; int pStrSize0 = 0; if (str1 != null) { pStrSize0 = Utils.GetByteCountUTF8(str1); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (str2 != null) { pStrSize1 = Utils.GetByteCountUTF8(str2); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(str2, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } int ret = ImStrnicmpNative(pStr0, pStr1, count); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImStrnicmp(ref byte str1, ReadOnlySpan str2, nuint count) { fixed (byte* pstr1 = &str1) { fixed (byte* pstr2 = str2) { int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); return ret; } } } /// /// To be documented. /// public static int ImStrnicmp(ref byte str1, string str2, nuint count) { fixed (byte* pstr1 = &str1) { byte* pStr0 = null; int pStrSize0 = 0; if (str2 != null) { pStrSize0 = Utils.GetByteCountUTF8(str2); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImStrnicmpNative((byte*)pstr1, pStr0, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImStrnicmp(ReadOnlySpan str1, ref byte str2, nuint count) { fixed (byte* pstr1 = str1) { fixed (byte* pstr2 = &str2) { int ret = ImStrnicmpNative((byte*)pstr1, (byte*)pstr2, count); return ret; } } } /// /// To be documented. /// public static int ImStrnicmp(ReadOnlySpan str1, string str2, nuint count) { fixed (byte* pstr1 = str1) { byte* pStr0 = null; int pStrSize0 = 0; if (str2 != null) { pStrSize0 = Utils.GetByteCountUTF8(str2); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str2, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImStrnicmpNative((byte*)pstr1, pStr0, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImStrnicmp(string str1, ref byte str2, nuint count) { byte* pStr0 = null; int pStrSize0 = 0; if (str1 != null) { pStrSize0 = Utils.GetByteCountUTF8(str1); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstr2 = &str2) { int ret = ImStrnicmpNative(pStr0, (byte*)pstr2, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImStrnicmp(string str1, ReadOnlySpan str2, nuint count) { byte* pStr0 = null; int pStrSize0 = 0; if (str1 != null) { pStrSize0 = Utils.GetByteCountUTF8(str1); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str1, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstr2 = str2) { int ret = ImStrnicmpNative(pStr0, (byte*)pstr2, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void ImStrncpyNative(byte* dst, byte* src, ulong count) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[700])(dst, src, count); #else ((delegate* unmanaged[Cdecl])funcTable[700])((nint)dst, (nint)src, count); #endif } /// /// To be documented. /// public static void ImStrncpy(byte* dst, byte* src, ulong count) { ImStrncpyNative(dst, src, count); } /// /// To be documented. /// public static void ImStrncpy(ref byte dst, byte* src, ulong count) { fixed (byte* pdst = &dst) { ImStrncpyNative((byte*)pdst, src, count); } } /// /// To be documented. /// public static void ImStrncpy(ref string dst, byte* src, ulong count) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImStrncpyNative(pStr0, src, count); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public static void ImStrncpy(byte* dst, ref byte src, ulong count) { fixed (byte* psrc = &src) { ImStrncpyNative(dst, (byte*)psrc, count); } } /// /// To be documented. /// public static void ImStrncpy(byte* dst, ReadOnlySpan src, ulong count) { fixed (byte* psrc = src) { ImStrncpyNative(dst, (byte*)psrc, count); } } /// /// To be documented. /// public static void ImStrncpy(byte* dst, string src, ulong count) { byte* pStr0 = null; int pStrSize0 = 0; if (src != null) { pStrSize0 = Utils.GetByteCountUTF8(src); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(src, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImStrncpyNative(dst, pStr0, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public static void ImStrncpy(ref byte dst, ref byte src, ulong count) { fixed (byte* pdst = &dst) { fixed (byte* psrc = &src) { ImStrncpyNative((byte*)pdst, (byte*)psrc, count); } } } /// /// To be documented. /// public static void ImStrncpy(ref byte dst, ReadOnlySpan src, ulong count) { fixed (byte* pdst = &dst) { fixed (byte* psrc = src) { ImStrncpyNative((byte*)pdst, (byte*)psrc, count); } } } /// /// To be documented. /// public static void ImStrncpy(ref string dst, string src, ulong count) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (src != null) { pStrSize1 = Utils.GetByteCountUTF8(src); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(src, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } ImStrncpyNative(pStr0, pStr1, count); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public static void ImStrncpy(ref byte dst, string src, ulong count) { fixed (byte* pdst = &dst) { byte* pStr0 = null; int pStrSize0 = 0; if (src != null) { pStrSize0 = Utils.GetByteCountUTF8(src); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(src, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImStrncpyNative((byte*)pdst, pStr0, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void ImStrncpy(ref string dst, ref byte src, ulong count) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* psrc = &src) { ImStrncpyNative(pStr0, (byte*)psrc, count); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void ImStrncpy(ref string dst, ReadOnlySpan src, ulong count) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* psrc = src) { ImStrncpyNative(pStr0, (byte*)psrc, count); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void ImStrncpy(byte* dst, byte* src, nuint count) { ImStrncpyNative(dst, src, count); } /// /// To be documented. /// public static void ImStrncpy(ref byte dst, byte* src, nuint count) { fixed (byte* pdst = &dst) { ImStrncpyNative((byte*)pdst, src, count); } } /// /// To be documented. /// public static void ImStrncpy(ref string dst, byte* src, nuint count) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImStrncpyNative(pStr0, src, count); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public static void ImStrncpy(byte* dst, ref byte src, nuint count) { fixed (byte* psrc = &src) { ImStrncpyNative(dst, (byte*)psrc, count); } } /// /// To be documented. /// public static void ImStrncpy(byte* dst, ReadOnlySpan src, nuint count) { fixed (byte* psrc = src) { ImStrncpyNative(dst, (byte*)psrc, count); } } /// /// To be documented. /// public static void ImStrncpy(byte* dst, string src, nuint count) { byte* pStr0 = null; int pStrSize0 = 0; if (src != null) { pStrSize0 = Utils.GetByteCountUTF8(src); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(src, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImStrncpyNative(dst, pStr0, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public static void ImStrncpy(ref byte dst, ref byte src, nuint count) { fixed (byte* pdst = &dst) { fixed (byte* psrc = &src) { ImStrncpyNative((byte*)pdst, (byte*)psrc, count); } } } /// /// To be documented. /// public static void ImStrncpy(ref byte dst, ReadOnlySpan src, nuint count) { fixed (byte* pdst = &dst) { fixed (byte* psrc = src) { ImStrncpyNative((byte*)pdst, (byte*)psrc, count); } } } /// /// To be documented. /// public static void ImStrncpy(ref string dst, string src, nuint count) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (src != null) { pStrSize1 = Utils.GetByteCountUTF8(src); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(src, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } ImStrncpyNative(pStr0, pStr1, count); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public static void ImStrncpy(ref byte dst, string src, nuint count) { fixed (byte* pdst = &dst) { byte* pStr0 = null; int pStrSize0 = 0; if (src != null) { pStrSize0 = Utils.GetByteCountUTF8(src); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(src, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImStrncpyNative((byte*)pdst, pStr0, count); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void ImStrncpy(ref string dst, ref byte src, nuint count) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* psrc = &src) { ImStrncpyNative(pStr0, (byte*)psrc, count); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void ImStrncpy(ref string dst, ReadOnlySpan src, nuint count) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* psrc = src) { ImStrncpyNative(pStr0, (byte*)psrc, count); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte* ImStrdupNative(byte* str) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[701])(str); #else return (byte*)((delegate* unmanaged[Cdecl])funcTable[701])((nint)str); #endif } /// /// To be documented. /// public static byte* ImStrdup(byte* str) { byte* ret = ImStrdupNative(str); return ret; } /// /// To be documented. /// public static string ImStrdupS(byte* str) { string ret = Utils.DecodeStringUTF8(ImStrdupNative(str)); return ret; } /// /// To be documented. /// public static byte* ImStrdup(ref byte str) { fixed (byte* pstr = &str) { byte* ret = ImStrdupNative((byte*)pstr); return ret; } } /// /// To be documented. /// public static string ImStrdupS(ref byte str) { fixed (byte* pstr = &str) { string ret = Utils.DecodeStringUTF8(ImStrdupNative((byte*)pstr)); return ret; } } /// /// To be documented. /// public static byte* ImStrdup(ReadOnlySpan str) { fixed (byte* pstr = str) { byte* ret = ImStrdupNative((byte*)pstr); return ret; } } /// /// To be documented. /// public static string ImStrdupS(ReadOnlySpan str) { fixed (byte* pstr = str) { string ret = Utils.DecodeStringUTF8(ImStrdupNative((byte*)pstr)); return ret; } } /// /// To be documented. /// public static byte* ImStrdup(string str) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStrdupNative(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStrdupS(string str) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStrdupNative(pStr0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte* ImStrdupcpyNative(byte* dst, ulong* pDstSize, byte* str) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[702])(dst, pDstSize, str); #else return (byte*)((delegate* unmanaged[Cdecl])funcTable[702])((nint)dst, (nint)pDstSize, (nint)str); #endif } /// /// To be documented. /// public static byte* ImStrdupcpy(byte* dst, ulong* pDstSize, byte* str) { byte* ret = ImStrdupcpyNative(dst, pDstSize, str); return ret; } /// /// To be documented. /// public static string ImStrdupcpyS(byte* dst, ulong* pDstSize, byte* str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, pDstSize, str)); return ret; } /// /// To be documented. /// public static byte* ImStrdupcpy(ref byte dst, ulong* pDstSize, byte* str) { fixed (byte* pdst = &dst) { byte* ret = ImStrdupcpyNative((byte*)pdst, pDstSize, str); return ret; } } /// /// To be documented. /// public static string ImStrdupcpyS(ref byte dst, ulong* pDstSize, byte* str) { fixed (byte* pdst = &dst) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, pDstSize, str)); return ret; } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref string dst, ulong* pDstSize, byte* str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStrdupcpyNative(pStr0, pDstSize, str); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStrdupcpyS(ref string dst, ulong* pDstSize, byte* str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(pStr0, pDstSize, str)); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStrdupcpy(byte* dst, ref nuint pDstSize, byte* str) { fixed (nuint* ppDstSize = &pDstSize) { byte* ret = ImStrdupcpyNative(dst, (ulong*)ppDstSize, str); return ret; } } /// /// To be documented. /// public static string ImStrdupcpyS(byte* dst, ref nuint pDstSize, byte* str) { fixed (nuint* ppDstSize = &pDstSize) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, (ulong*)ppDstSize, str)); return ret; } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref byte dst, ref nuint pDstSize, byte* str) { fixed (byte* pdst = &dst) { fixed (nuint* ppDstSize = &pDstSize) { byte* ret = ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, str); return ret; } } } /// /// To be documented. /// public static string ImStrdupcpyS(ref byte dst, ref nuint pDstSize, byte* str) { fixed (byte* pdst = &dst) { fixed (nuint* ppDstSize = &pDstSize) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, str)); return ret; } } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref string dst, ref nuint pDstSize, byte* str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (nuint* ppDstSize = &pDstSize) { byte* ret = ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, str); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStrdupcpyS(ref string dst, ref nuint pDstSize, byte* str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (nuint* ppDstSize = &pDstSize) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, str)); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStrdupcpy(byte* dst, ulong* pDstSize, ref byte str) { fixed (byte* pstr = &str) { byte* ret = ImStrdupcpyNative(dst, pDstSize, (byte*)pstr); return ret; } } /// /// To be documented. /// public static string ImStrdupcpyS(byte* dst, ulong* pDstSize, ref byte str) { fixed (byte* pstr = &str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, pDstSize, (byte*)pstr)); return ret; } } /// /// To be documented. /// public static byte* ImStrdupcpy(byte* dst, ulong* pDstSize, ReadOnlySpan str) { fixed (byte* pstr = str) { byte* ret = ImStrdupcpyNative(dst, pDstSize, (byte*)pstr); return ret; } } /// /// To be documented. /// public static string ImStrdupcpyS(byte* dst, ulong* pDstSize, ReadOnlySpan str) { fixed (byte* pstr = str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, pDstSize, (byte*)pstr)); return ret; } } /// /// To be documented. /// public static byte* ImStrdupcpy(byte* dst, ulong* pDstSize, string str) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStrdupcpyNative(dst, pDstSize, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStrdupcpyS(byte* dst, ulong* pDstSize, string str) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, pDstSize, pStr0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStrdupcpy(ref byte dst, ulong* pDstSize, ref byte str) { fixed (byte* pdst = &dst) { fixed (byte* pstr = &str) { byte* ret = ImStrdupcpyNative((byte*)pdst, pDstSize, (byte*)pstr); return ret; } } } /// /// To be documented. /// public static string ImStrdupcpyS(ref byte dst, ulong* pDstSize, ref byte str) { fixed (byte* pdst = &dst) { fixed (byte* pstr = &str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, pDstSize, (byte*)pstr)); return ret; } } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref byte dst, ulong* pDstSize, ReadOnlySpan str) { fixed (byte* pdst = &dst) { fixed (byte* pstr = str) { byte* ret = ImStrdupcpyNative((byte*)pdst, pDstSize, (byte*)pstr); return ret; } } } /// /// To be documented. /// public static string ImStrdupcpyS(ref byte dst, ulong* pDstSize, ReadOnlySpan str) { fixed (byte* pdst = &dst) { fixed (byte* pstr = str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, pDstSize, (byte*)pstr)); return ret; } } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref string dst, ulong* pDstSize, string str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (str != null) { pStrSize1 = Utils.GetByteCountUTF8(str); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(str, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte* ret = ImStrdupcpyNative(pStr0, pDstSize, pStr1); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStrdupcpyS(ref string dst, ulong* pDstSize, string str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (str != null) { pStrSize1 = Utils.GetByteCountUTF8(str); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(str, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(pStr0, pDstSize, pStr1)); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStrdupcpy(ref byte dst, ulong* pDstSize, string str) { fixed (byte* pdst = &dst) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStrdupcpyNative((byte*)pdst, pDstSize, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStrdupcpyS(ref byte dst, ulong* pDstSize, string str) { fixed (byte* pdst = &dst) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, pDstSize, pStr0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref string dst, ulong* pDstSize, ref byte str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstr = &str) { byte* ret = ImStrdupcpyNative(pStr0, pDstSize, (byte*)pstr); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStrdupcpyS(ref string dst, ulong* pDstSize, ref byte str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstr = &str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(pStr0, pDstSize, (byte*)pstr)); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref string dst, ulong* pDstSize, ReadOnlySpan str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstr = str) { byte* ret = ImStrdupcpyNative(pStr0, pDstSize, (byte*)pstr); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStrdupcpyS(ref string dst, ulong* pDstSize, ReadOnlySpan str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstr = str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(pStr0, pDstSize, (byte*)pstr)); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStrdupcpy(byte* dst, ref nuint pDstSize, ref byte str) { fixed (nuint* ppDstSize = &pDstSize) { fixed (byte* pstr = &str) { byte* ret = ImStrdupcpyNative(dst, (ulong*)ppDstSize, (byte*)pstr); return ret; } } } /// /// To be documented. /// public static string ImStrdupcpyS(byte* dst, ref nuint pDstSize, ref byte str) { fixed (nuint* ppDstSize = &pDstSize) { fixed (byte* pstr = &str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, (ulong*)ppDstSize, (byte*)pstr)); return ret; } } } /// /// To be documented. /// public static byte* ImStrdupcpy(byte* dst, ref nuint pDstSize, ReadOnlySpan str) { fixed (nuint* ppDstSize = &pDstSize) { fixed (byte* pstr = str) { byte* ret = ImStrdupcpyNative(dst, (ulong*)ppDstSize, (byte*)pstr); return ret; } } } /// /// To be documented. /// public static string ImStrdupcpyS(byte* dst, ref nuint pDstSize, ReadOnlySpan str) { fixed (nuint* ppDstSize = &pDstSize) { fixed (byte* pstr = str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, (ulong*)ppDstSize, (byte*)pstr)); return ret; } } } /// /// To be documented. /// public static byte* ImStrdupcpy(byte* dst, ref nuint pDstSize, string str) { fixed (nuint* ppDstSize = &pDstSize) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStrdupcpyNative(dst, (ulong*)ppDstSize, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStrdupcpyS(byte* dst, ref nuint pDstSize, string str) { fixed (nuint* ppDstSize = &pDstSize) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, (ulong*)ppDstSize, pStr0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref byte dst, ref nuint pDstSize, ref byte str) { fixed (byte* pdst = &dst) { fixed (nuint* ppDstSize = &pDstSize) { fixed (byte* pstr = &str) { byte* ret = ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, (byte*)pstr); return ret; } } } } /// /// To be documented. /// public static string ImStrdupcpyS(ref byte dst, ref nuint pDstSize, ref byte str) { fixed (byte* pdst = &dst) { fixed (nuint* ppDstSize = &pDstSize) { fixed (byte* pstr = &str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, (byte*)pstr)); return ret; } } } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref byte dst, ref nuint pDstSize, ReadOnlySpan str) { fixed (byte* pdst = &dst) { fixed (nuint* ppDstSize = &pDstSize) { fixed (byte* pstr = str) { byte* ret = ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, (byte*)pstr); return ret; } } } } /// /// To be documented. /// public static string ImStrdupcpyS(ref byte dst, ref nuint pDstSize, ReadOnlySpan str) { fixed (byte* pdst = &dst) { fixed (nuint* ppDstSize = &pDstSize) { fixed (byte* pstr = str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, (byte*)pstr)); return ret; } } } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref string dst, ref nuint pDstSize, string str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (nuint* ppDstSize = &pDstSize) { byte* pStr1 = null; int pStrSize1 = 0; if (str != null) { pStrSize1 = Utils.GetByteCountUTF8(str); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(str, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte* ret = ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, pStr1); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStrdupcpyS(ref string dst, ref nuint pDstSize, string str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (nuint* ppDstSize = &pDstSize) { byte* pStr1 = null; int pStrSize1 = 0; if (str != null) { pStrSize1 = Utils.GetByteCountUTF8(str); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(str, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, pStr1)); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref byte dst, ref nuint pDstSize, string str) { fixed (byte* pdst = &dst) { fixed (nuint* ppDstSize = &pDstSize) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static string ImStrdupcpyS(ref byte dst, ref nuint pDstSize, string str) { fixed (byte* pdst = &dst) { fixed (nuint* ppDstSize = &pDstSize) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative((byte*)pdst, (ulong*)ppDstSize, pStr0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref string dst, ref nuint pDstSize, ref byte str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (nuint* ppDstSize = &pDstSize) { fixed (byte* pstr = &str) { byte* ret = ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, (byte*)pstr); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static string ImStrdupcpyS(ref string dst, ref nuint pDstSize, ref byte str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (nuint* ppDstSize = &pDstSize) { fixed (byte* pstr = &str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, (byte*)pstr)); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStrdupcpy(ref string dst, ref nuint pDstSize, ReadOnlySpan str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (nuint* ppDstSize = &pDstSize) { fixed (byte* pstr = str) { byte* ret = ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, (byte*)pstr); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static string ImStrdupcpyS(ref string dst, ref nuint pDstSize, ReadOnlySpan str) { byte* pStr0 = null; int pStrSize0 = 0; if (dst != null) { pStrSize0 = Utils.GetByteCountUTF8(dst); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(dst, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (nuint* ppDstSize = &pDstSize) { fixed (byte* pstr = str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(pStr0, (ulong*)ppDstSize, (byte*)pstr)); dst = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte* ImStrchrRangeNative(byte* strBegin, byte* strEnd, byte c) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[703])(strBegin, strEnd, c); #else return (byte*)((delegate* unmanaged[Cdecl])funcTable[703])((nint)strBegin, (nint)strEnd, c); #endif } /// /// To be documented. /// public static byte* ImStrchrRange(byte* strBegin, byte* strEnd, byte c) { byte* ret = ImStrchrRangeNative(strBegin, strEnd, c); return ret; } /// /// To be documented. /// public static string ImStrchrRangeS(byte* strBegin, byte* strEnd, byte c) { string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(strBegin, strEnd, c)); return ret; } /// /// To be documented. /// public static byte* ImStrchrRange(ref byte strBegin, byte* strEnd, byte c) { fixed (byte* pstrBegin = &strBegin) { byte* ret = ImStrchrRangeNative((byte*)pstrBegin, strEnd, c); return ret; } } /// /// To be documented. /// public static string ImStrchrRangeS(ref byte strBegin, byte* strEnd, byte c) { fixed (byte* pstrBegin = &strBegin) { string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, strEnd, c)); return ret; } } /// /// To be documented. /// public static byte* ImStrchrRange(ReadOnlySpan strBegin, byte* strEnd, byte c) { fixed (byte* pstrBegin = strBegin) { byte* ret = ImStrchrRangeNative((byte*)pstrBegin, strEnd, c); return ret; } } /// /// To be documented. /// public static string ImStrchrRangeS(ReadOnlySpan strBegin, byte* strEnd, byte c) { fixed (byte* pstrBegin = strBegin) { string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, strEnd, c)); return ret; } } /// /// To be documented. /// public static byte* ImStrchrRange(string strBegin, byte* strEnd, byte c) { byte* pStr0 = null; int pStrSize0 = 0; if (strBegin != null) { pStrSize0 = Utils.GetByteCountUTF8(strBegin); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStrchrRangeNative(pStr0, strEnd, c); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStrchrRangeS(string strBegin, byte* strEnd, byte c) { byte* pStr0 = null; int pStrSize0 = 0; if (strBegin != null) { pStrSize0 = Utils.GetByteCountUTF8(strBegin); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(pStr0, strEnd, c)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStrchrRange(byte* strBegin, ref byte strEnd, byte c) { fixed (byte* pstrEnd = &strEnd) { byte* ret = ImStrchrRangeNative(strBegin, (byte*)pstrEnd, c); return ret; } } /// /// To be documented. /// public static string ImStrchrRangeS(byte* strBegin, ref byte strEnd, byte c) { fixed (byte* pstrEnd = &strEnd) { string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(strBegin, (byte*)pstrEnd, c)); return ret; } } /// /// To be documented. /// public static byte* ImStrchrRange(byte* strBegin, ReadOnlySpan strEnd, byte c) { fixed (byte* pstrEnd = strEnd) { byte* ret = ImStrchrRangeNative(strBegin, (byte*)pstrEnd, c); return ret; } } /// /// To be documented. /// public static string ImStrchrRangeS(byte* strBegin, ReadOnlySpan strEnd, byte c) { fixed (byte* pstrEnd = strEnd) { string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(strBegin, (byte*)pstrEnd, c)); return ret; } } /// /// To be documented. /// public static byte* ImStrchrRange(byte* strBegin, string strEnd, byte c) { byte* pStr0 = null; int pStrSize0 = 0; if (strEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStrchrRangeNative(strBegin, pStr0, c); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStrchrRangeS(byte* strBegin, string strEnd, byte c) { byte* pStr0 = null; int pStrSize0 = 0; if (strEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(strBegin, pStr0, c)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStrchrRange(ref byte strBegin, ref byte strEnd, byte c) { fixed (byte* pstrBegin = &strBegin) { fixed (byte* pstrEnd = &strEnd) { byte* ret = ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c); return ret; } } } /// /// To be documented. /// public static string ImStrchrRangeS(ref byte strBegin, ref byte strEnd, byte c) { fixed (byte* pstrBegin = &strBegin) { fixed (byte* pstrEnd = &strEnd) { string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c)); return ret; } } } /// /// To be documented. /// public static byte* ImStrchrRange(ReadOnlySpan strBegin, ReadOnlySpan strEnd, byte c) { fixed (byte* pstrBegin = strBegin) { fixed (byte* pstrEnd = strEnd) { byte* ret = ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c); return ret; } } } /// /// To be documented. /// public static string ImStrchrRangeS(ReadOnlySpan strBegin, ReadOnlySpan strEnd, byte c) { fixed (byte* pstrBegin = strBegin) { fixed (byte* pstrEnd = strEnd) { string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c)); return ret; } } } /// /// To be documented. /// public static byte* ImStrchrRange(string strBegin, string strEnd, byte c) { byte* pStr0 = null; int pStrSize0 = 0; if (strBegin != null) { pStrSize0 = Utils.GetByteCountUTF8(strBegin); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (strEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(strEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(strEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte* ret = ImStrchrRangeNative(pStr0, pStr1, c); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStrchrRangeS(string strBegin, string strEnd, byte c) { byte* pStr0 = null; int pStrSize0 = 0; if (strBegin != null) { pStrSize0 = Utils.GetByteCountUTF8(strBegin); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (strEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(strEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(strEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(pStr0, pStr1, c)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStrchrRange(ref byte strBegin, ReadOnlySpan strEnd, byte c) { fixed (byte* pstrBegin = &strBegin) { fixed (byte* pstrEnd = strEnd) { byte* ret = ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c); return ret; } } } /// /// To be documented. /// public static string ImStrchrRangeS(ref byte strBegin, ReadOnlySpan strEnd, byte c) { fixed (byte* pstrBegin = &strBegin) { fixed (byte* pstrEnd = strEnd) { string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c)); return ret; } } } /// /// To be documented. /// public static byte* ImStrchrRange(ref byte strBegin, string strEnd, byte c) { fixed (byte* pstrBegin = &strBegin) { byte* pStr0 = null; int pStrSize0 = 0; if (strEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStrchrRangeNative((byte*)pstrBegin, pStr0, c); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStrchrRangeS(ref byte strBegin, string strEnd, byte c) { fixed (byte* pstrBegin = &strBegin) { byte* pStr0 = null; int pStrSize0 = 0; if (strEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, pStr0, c)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStrchrRange(ReadOnlySpan strBegin, ref byte strEnd, byte c) { fixed (byte* pstrBegin = strBegin) { fixed (byte* pstrEnd = &strEnd) { byte* ret = ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c); return ret; } } } /// /// To be documented. /// public static string ImStrchrRangeS(ReadOnlySpan strBegin, ref byte strEnd, byte c) { fixed (byte* pstrBegin = strBegin) { fixed (byte* pstrEnd = &strEnd) { string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, (byte*)pstrEnd, c)); return ret; } } } /// /// To be documented. /// public static byte* ImStrchrRange(ReadOnlySpan strBegin, string strEnd, byte c) { fixed (byte* pstrBegin = strBegin) { byte* pStr0 = null; int pStrSize0 = 0; if (strEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStrchrRangeNative((byte*)pstrBegin, pStr0, c); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStrchrRangeS(ReadOnlySpan strBegin, string strEnd, byte c) { fixed (byte* pstrBegin = strBegin) { byte* pStr0 = null; int pStrSize0 = 0; if (strEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative((byte*)pstrBegin, pStr0, c)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStrchrRange(string strBegin, ref byte strEnd, byte c) { byte* pStr0 = null; int pStrSize0 = 0; if (strBegin != null) { pStrSize0 = Utils.GetByteCountUTF8(strBegin); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstrEnd = &strEnd) { byte* ret = ImStrchrRangeNative(pStr0, (byte*)pstrEnd, c); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStrchrRangeS(string strBegin, ref byte strEnd, byte c) { byte* pStr0 = null; int pStrSize0 = 0; if (strBegin != null) { pStrSize0 = Utils.GetByteCountUTF8(strBegin); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstrEnd = &strEnd) { string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(pStr0, (byte*)pstrEnd, c)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStrchrRange(string strBegin, ReadOnlySpan strEnd, byte c) { byte* pStr0 = null; int pStrSize0 = 0; if (strBegin != null) { pStrSize0 = Utils.GetByteCountUTF8(strBegin); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstrEnd = strEnd) { byte* ret = ImStrchrRangeNative(pStr0, (byte*)pstrEnd, c); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStrchrRangeS(string strBegin, ReadOnlySpan strEnd, byte c) { byte* pStr0 = null; int pStrSize0 = 0; if (strBegin != null) { pStrSize0 = Utils.GetByteCountUTF8(strBegin); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strBegin, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstrEnd = strEnd) { string ret = Utils.DecodeStringUTF8(ImStrchrRangeNative(pStr0, (byte*)pstrEnd, c)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static int ImStrlenWNative(ushort* str) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[704])(str); #else return (int)((delegate* unmanaged[Cdecl])funcTable[704])((nint)str); #endif } /// /// To be documented. /// public static int ImStrlenW(ushort* str) { int ret = ImStrlenWNative(str); return ret; } /// /// To be documented. /// public static int ImStrlenW(ref ushort str) { fixed (ushort* pstr = &str) { int ret = ImStrlenWNative((ushort*)pstr); return ret; } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte* ImStreolRangeNative(byte* str, byte* strEnd) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[705])(str, strEnd); #else return (byte*)((delegate* unmanaged[Cdecl])funcTable[705])((nint)str, (nint)strEnd); #endif } /// /// To be documented. /// public static byte* ImStreolRange(byte* str, byte* strEnd) { byte* ret = ImStreolRangeNative(str, strEnd); return ret; } /// /// To be documented. /// public static string ImStreolRangeS(byte* str, byte* strEnd) { string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(str, strEnd)); return ret; } /// /// To be documented. /// public static byte* ImStreolRange(ref byte str, byte* strEnd) { fixed (byte* pstr = &str) { byte* ret = ImStreolRangeNative((byte*)pstr, strEnd); return ret; } } /// /// To be documented. /// public static string ImStreolRangeS(ref byte str, byte* strEnd) { fixed (byte* pstr = &str) { string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, strEnd)); return ret; } } /// /// To be documented. /// public static byte* ImStreolRange(ReadOnlySpan str, byte* strEnd) { fixed (byte* pstr = str) { byte* ret = ImStreolRangeNative((byte*)pstr, strEnd); return ret; } } /// /// To be documented. /// public static string ImStreolRangeS(ReadOnlySpan str, byte* strEnd) { fixed (byte* pstr = str) { string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, strEnd)); return ret; } } /// /// To be documented. /// public static byte* ImStreolRange(string str, byte* strEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStreolRangeNative(pStr0, strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStreolRangeS(string str, byte* strEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(pStr0, strEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStreolRange(byte* str, ref byte strEnd) { fixed (byte* pstrEnd = &strEnd) { byte* ret = ImStreolRangeNative(str, (byte*)pstrEnd); return ret; } } /// /// To be documented. /// public static string ImStreolRangeS(byte* str, ref byte strEnd) { fixed (byte* pstrEnd = &strEnd) { string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(str, (byte*)pstrEnd)); return ret; } } /// /// To be documented. /// public static byte* ImStreolRange(byte* str, ReadOnlySpan strEnd) { fixed (byte* pstrEnd = strEnd) { byte* ret = ImStreolRangeNative(str, (byte*)pstrEnd); return ret; } } /// /// To be documented. /// public static string ImStreolRangeS(byte* str, ReadOnlySpan strEnd) { fixed (byte* pstrEnd = strEnd) { string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(str, (byte*)pstrEnd)); return ret; } } /// /// To be documented. /// public static byte* ImStreolRange(byte* str, string strEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (strEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStreolRangeNative(str, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStreolRangeS(byte* str, string strEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (strEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(str, pStr0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStreolRange(ref byte str, ref byte strEnd) { fixed (byte* pstr = &str) { fixed (byte* pstrEnd = &strEnd) { byte* ret = ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd); return ret; } } } /// /// To be documented. /// public static string ImStreolRangeS(ref byte str, ref byte strEnd) { fixed (byte* pstr = &str) { fixed (byte* pstrEnd = &strEnd) { string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd)); return ret; } } } /// /// To be documented. /// public static byte* ImStreolRange(ReadOnlySpan str, ReadOnlySpan strEnd) { fixed (byte* pstr = str) { fixed (byte* pstrEnd = strEnd) { byte* ret = ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd); return ret; } } } /// /// To be documented. /// public static string ImStreolRangeS(ReadOnlySpan str, ReadOnlySpan strEnd) { fixed (byte* pstr = str) { fixed (byte* pstrEnd = strEnd) { string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd)); return ret; } } } /// /// To be documented. /// public static byte* ImStreolRange(string str, string strEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (strEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(strEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(strEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte* ret = ImStreolRangeNative(pStr0, pStr1); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStreolRangeS(string str, string strEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (strEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(strEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(strEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(pStr0, pStr1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStreolRange(ref byte str, ReadOnlySpan strEnd) { fixed (byte* pstr = &str) { fixed (byte* pstrEnd = strEnd) { byte* ret = ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd); return ret; } } } /// /// To be documented. /// public static string ImStreolRangeS(ref byte str, ReadOnlySpan strEnd) { fixed (byte* pstr = &str) { fixed (byte* pstrEnd = strEnd) { string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd)); return ret; } } } /// /// To be documented. /// public static byte* ImStreolRange(ref byte str, string strEnd) { fixed (byte* pstr = &str) { byte* pStr0 = null; int pStrSize0 = 0; if (strEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStreolRangeNative((byte*)pstr, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStreolRangeS(ref byte str, string strEnd) { fixed (byte* pstr = &str) { byte* pStr0 = null; int pStrSize0 = 0; if (strEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, pStr0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStreolRange(ReadOnlySpan str, ref byte strEnd) { fixed (byte* pstr = str) { fixed (byte* pstrEnd = &strEnd) { byte* ret = ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd); return ret; } } } /// /// To be documented. /// public static string ImStreolRangeS(ReadOnlySpan str, ref byte strEnd) { fixed (byte* pstr = str) { fixed (byte* pstrEnd = &strEnd) { string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, (byte*)pstrEnd)); return ret; } } } /// /// To be documented. /// public static byte* ImStreolRange(ReadOnlySpan str, string strEnd) { fixed (byte* pstr = str) { byte* pStr0 = null; int pStrSize0 = 0; if (strEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStreolRangeNative((byte*)pstr, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStreolRangeS(ReadOnlySpan str, string strEnd) { fixed (byte* pstr = str) { byte* pStr0 = null; int pStrSize0 = 0; if (strEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(strEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(strEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStreolRangeNative((byte*)pstr, pStr0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStreolRange(string str, ref byte strEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (str != null) { pStrSize0 = Utils.GetByteCountUTF8(str); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pstrEnd = &strEnd) { byte* ret = ImStreolRangeNative(pStr0, (byte*)pstrEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } }