// ------------------------------------------------------------------------------ // // 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, nuint dataSize, uint seed) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[688])(data, dataSize, seed); #else return (uint)((delegate* unmanaged[Cdecl])funcTable[688])((nint)data, dataSize, seed); #endif } /// /// 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, nuint dataSize, uint seed) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[689])(data, dataSize, seed); #else return (uint)((delegate* unmanaged[Cdecl])funcTable[689])((nint)data, dataSize, seed); #endif } /// /// 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(byte* data) { uint ret = ImHashStrNative(data, (nuint)(0), (uint)(0)); return ret; } /// /// To be documented. /// public static uint ImHashStr(byte* data, uint seed) { uint ret = ImHashStrNative(data, (nuint)(0), seed); 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(ref byte data) { fixed (byte* pdata = &data) { uint ret = ImHashStrNative((byte*)pdata, (nuint)(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, (nuint)(0), seed); 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(ReadOnlySpan data) { fixed (byte* pdata = data) { uint ret = ImHashStrNative((byte*)pdata, (nuint)(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, (nuint)(0), seed); 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. /// 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, (nuint)(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, (nuint)(0), seed); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void ImQsortNative(void* baseValue, nuint count, nuint sizeOfElement, delegate*, int> compareFunc) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl], int>, void>)funcTable[690])(baseValue, count, sizeOfElement, compareFunc); #else ((delegate* unmanaged[Cdecl])funcTable[690])((nint)baseValue, count, sizeOfElement, (nint)compareFunc); #endif } /// /// 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[691])(colA, colB); #else return (uint)((delegate* unmanaged[Cdecl])funcTable[691])(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[692])(v); #else return (byte)((delegate* unmanaged[Cdecl])funcTable[692])(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[693])(v); #else return (byte)((delegate* unmanaged[Cdecl])funcTable[693])(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[694])(v); #else return (int)((delegate* unmanaged[Cdecl])funcTable[694])(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[695])(str1, str2); #else return (int)((delegate* unmanaged[Cdecl])funcTable[695])((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, nuint count) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[696])(str1, str2, count); #else return (int)((delegate* unmanaged[Cdecl])funcTable[696])((nint)str1, (nint)str2, count); #endif } /// /// 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, nuint count) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[697])(dst, src, count); #else ((delegate* unmanaged[Cdecl])funcTable[697])((nint)dst, (nint)src, count); #endif } /// /// 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[698])(str); #else return (byte*)((delegate* unmanaged[Cdecl])funcTable[698])((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, nuint* pDstSize, byte* str) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[699])(dst, pDstSize, str); #else return (byte*)((delegate* unmanaged[Cdecl])funcTable[699])((nint)dst, (nint)pDstSize, (nint)str); #endif } /// /// To be documented. /// public static byte* ImStrdupcpy(byte* dst, nuint* pDstSize, byte* str) { byte* ret = ImStrdupcpyNative(dst, pDstSize, str); return ret; } /// /// To be documented. /// public static string ImStrdupcpyS(byte* dst, nuint* pDstSize, byte* str) { string ret = Utils.DecodeStringUTF8(ImStrdupcpyNative(dst, pDstSize, str)); return ret; } /// /// To be documented. /// public static byte* ImStrdupcpy(ref byte dst, nuint* 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, nuint* 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, 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; } 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, 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; } 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, nuint* 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, nuint* 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, nuint* 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, nuint* 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, nuint* 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, nuint* 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, nuint* 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, nuint* 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, nuint* 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, nuint* 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, 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; } 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, 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; } 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, nuint* 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, nuint* 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, 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 (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, 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 (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, 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 (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, 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 (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. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte* ImStrchrRangeNative(byte* strBegin, byte* strEnd, byte c) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[700])(strBegin, strEnd, c); #else return (byte*)((delegate* unmanaged[Cdecl])funcTable[700])((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[701])(str); #else return (int)((delegate* unmanaged[Cdecl])funcTable[701])((nint)str); #endif } /// /// To be documented. /// public static int ImStrlenW(ushort* str) { int ret = ImStrlenWNative(str); 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[702])(str, strEnd); #else return (byte*)((delegate* unmanaged[Cdecl])funcTable[702])((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; } } /// /// To be documented. /// public static string ImStreolRangeS(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) { string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(pStr0, (byte*)pstrEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStreolRange(string str, ReadOnlySpan 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; } } /// /// To be documented. /// public static string ImStreolRangeS(string str, ReadOnlySpan 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) { string ret = Utils.DecodeStringUTF8(ImStreolRangeNative(pStr0, (byte*)pstrEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static ushort* ImStrbolWNative(ushort* bufMidLine, ushort* bufBegin) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[703])(bufMidLine, bufBegin); #else return (ushort*)((delegate* unmanaged[Cdecl])funcTable[703])((nint)bufMidLine, (nint)bufBegin); #endif } /// /// To be documented. /// public static ushort* ImStrbolW(ushort* bufMidLine, ushort* bufBegin) { ushort* ret = ImStrbolWNative(bufMidLine, bufBegin); return ret; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte* ImStristrNative(byte* haystack, byte* haystackEnd, byte* needle, byte* needleEnd) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[704])(haystack, haystackEnd, needle, needleEnd); #else return (byte*)((delegate* unmanaged[Cdecl])funcTable[704])((nint)haystack, (nint)haystackEnd, (nint)needle, (nint)needleEnd); #endif } /// /// To be documented. /// public static byte* ImStristr(byte* haystack, byte* haystackEnd, byte* needle, byte* needleEnd) { byte* ret = ImStristrNative(haystack, haystackEnd, needle, needleEnd); return ret; } /// /// To be documented. /// public static string ImStristrS(byte* haystack, byte* haystackEnd, byte* needle, byte* needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, haystackEnd, needle, needleEnd)); return ret; } /// /// To be documented. /// public static byte* ImStristr(ref byte haystack, byte* haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, needle, needleEnd); return ret; } } /// /// To be documented. /// public static string ImStristrS(ref byte haystack, byte* haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, haystackEnd, needle, needleEnd)); return ret; } } /// /// To be documented. /// public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, needle, needleEnd); return ret; } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, haystackEnd, needle, needleEnd)); return ret; } } /// /// To be documented. /// public static byte* ImStristr(string haystack, byte* haystackEnd, byte* needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStristrNative(pStr0, haystackEnd, needle, needleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStristrS(string haystack, byte* haystackEnd, byte* needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, haystackEnd, needle, needleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStristr(byte* haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystackEnd = &haystackEnd) { byte* ret = ImStristrNative(haystack, (byte*)phaystackEnd, needle, needleEnd); return ret; } } /// /// To be documented. /// public static string ImStristrS(byte* haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystackEnd = &haystackEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, (byte*)phaystackEnd, needle, needleEnd)); return ret; } } /// /// To be documented. /// public static byte* ImStristr(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystackEnd = haystackEnd) { byte* ret = ImStristrNative(haystack, (byte*)phaystackEnd, needle, needleEnd); return ret; } } /// /// To be documented. /// public static string ImStristrS(byte* haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystackEnd = haystackEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, (byte*)phaystackEnd, needle, needleEnd)); return ret; } } /// /// To be documented. /// public static byte* ImStristr(byte* haystack, string haystackEnd, byte* needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystackEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStristrNative(haystack, pStr0, needle, needleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStristrS(byte* haystack, string haystackEnd, byte* needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystackEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, pStr0, needle, needleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStristr(ref byte haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { fixed (byte* phaystackEnd = &haystackEnd) { byte* ret = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd); return ret; } } } /// /// To be documented. /// public static string ImStristrS(ref byte haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { fixed (byte* phaystackEnd = &haystackEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd)); return ret; } } } /// /// To be documented. /// public static byte* ImStristr(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { fixed (byte* phaystackEnd = haystackEnd) { byte* ret = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd); return ret; } } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { fixed (byte* phaystackEnd = haystackEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd)); return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, string haystackEnd, byte* needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (haystackEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte* ret = ImStristrNative(pStr0, pStr1, needle, needleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStristrS(string haystack, string haystackEnd, byte* needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (haystackEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(haystackEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(haystackEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, pStr1, needle, needleEnd)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStristr(ref byte haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { fixed (byte* phaystackEnd = haystackEnd) { byte* ret = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd); return ret; } } } /// /// To be documented. /// public static string ImStristrS(ref byte haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { fixed (byte* phaystackEnd = haystackEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd)); return ret; } } } /// /// To be documented. /// public static byte* ImStristr(ref byte haystack, string haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { byte* pStr0 = null; int pStrSize0 = 0; if (haystackEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStristrNative((byte*)phaystack, pStr0, needle, needleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStristrS(ref byte haystack, string haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { byte* pStr0 = null; int pStrSize0 = 0; if (haystackEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, pStr0, needle, needleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(ReadOnlySpan haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { fixed (byte* phaystackEnd = &haystackEnd) { byte* ret = ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd); return ret; } } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { fixed (byte* phaystackEnd = &haystackEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, (byte*)phaystackEnd, needle, needleEnd)); return ret; } } } /// /// To be documented. /// public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { byte* pStr0 = null; int pStrSize0 = 0; if (haystackEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStristrNative((byte*)phaystack, pStr0, needle, needleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, byte* needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { byte* pStr0 = null; int pStrSize0 = 0; if (haystackEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(haystackEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystackEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, pStr0, needle, needleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phaystackEnd = &haystackEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, needle, needleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStristrS(string haystack, ref byte haystackEnd, byte* needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phaystackEnd = &haystackEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, needle, needleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phaystackEnd = haystackEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, needle, needleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, byte* needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phaystackEnd = haystackEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, needle, needleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(byte* haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) { fixed (byte* pneedle = &needle) { byte* ret = ImStristrNative(haystack, haystackEnd, (byte*)pneedle, needleEnd); return ret; } } /// /// To be documented. /// public static string ImStristrS(byte* haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) { fixed (byte* pneedle = &needle) { string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, haystackEnd, (byte*)pneedle, needleEnd)); return ret; } } /// /// To be documented. /// public static byte* ImStristr(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) { fixed (byte* pneedle = needle) { byte* ret = ImStristrNative(haystack, haystackEnd, (byte*)pneedle, needleEnd); return ret; } } /// /// To be documented. /// public static string ImStristrS(byte* haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) { fixed (byte* pneedle = needle) { string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, haystackEnd, (byte*)pneedle, needleEnd)); return ret; } } /// /// To be documented. /// public static byte* ImStristr(byte* haystack, byte* haystackEnd, string needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (needle != null) { pStrSize0 = Utils.GetByteCountUTF8(needle); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStristrNative(haystack, haystackEnd, pStr0, needleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStristrS(byte* haystack, byte* haystackEnd, string needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (needle != null) { pStrSize0 = Utils.GetByteCountUTF8(needle); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(haystack, haystackEnd, pStr0, needleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStristr(ref byte haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { fixed (byte* pneedle = &needle) { byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd); return ret; } } } /// /// To be documented. /// public static string ImStristrS(ref byte haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { fixed (byte* pneedle = &needle) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd)); return ret; } } } /// /// To be documented. /// public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { fixed (byte* pneedle = needle) { byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd); return ret; } } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { fixed (byte* pneedle = needle) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd)); return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, byte* haystackEnd, string needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (needle != null) { pStrSize1 = Utils.GetByteCountUTF8(needle); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte* ret = ImStristrNative(pStr0, haystackEnd, pStr1, needleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStristrS(string haystack, byte* haystackEnd, string needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (needle != null) { pStrSize1 = Utils.GetByteCountUTF8(needle); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(needle, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, haystackEnd, pStr1, needleEnd)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static byte* ImStristr(ref byte haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { fixed (byte* pneedle = needle) { byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd); return ret; } } } /// /// To be documented. /// public static string ImStristrS(ref byte haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { fixed (byte* pneedle = needle) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd)); return ret; } } } /// /// To be documented. /// public static byte* ImStristr(ref byte haystack, byte* haystackEnd, string needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { byte* pStr0 = null; int pStrSize0 = 0; if (needle != null) { pStrSize0 = Utils.GetByteCountUTF8(needle); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, pStr0, needleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStristrS(ref byte haystack, byte* haystackEnd, string needle, byte* needleEnd) { fixed (byte* phaystack = &haystack) { byte* pStr0 = null; int pStrSize0 = 0; if (needle != null) { pStrSize0 = Utils.GetByteCountUTF8(needle); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, haystackEnd, pStr0, needleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { fixed (byte* pneedle = &needle) { byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd); return ret; } } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { fixed (byte* pneedle = &needle) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, haystackEnd, (byte*)pneedle, needleEnd)); return ret; } } } /// /// To be documented. /// public static byte* ImStristr(ReadOnlySpan haystack, byte* haystackEnd, string needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { byte* pStr0 = null; int pStrSize0 = 0; if (needle != null) { pStrSize0 = Utils.GetByteCountUTF8(needle); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImStristrNative((byte*)phaystack, haystackEnd, pStr0, needleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, byte* haystackEnd, string needle, byte* needleEnd) { fixed (byte* phaystack = haystack) { byte* pStr0 = null; int pStrSize0 = 0; if (needle != null) { pStrSize0 = Utils.GetByteCountUTF8(needle); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(needle, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, haystackEnd, pStr0, needleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(string haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pneedle = &needle) { byte* ret = ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, needleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStristrS(string haystack, byte* haystackEnd, ref byte needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pneedle = &needle) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, needleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(string haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pneedle = needle) { byte* ret = ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, needleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStristrS(string haystack, byte* haystackEnd, ReadOnlySpan needle, byte* needleEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (haystack != null) { pStrSize0 = Utils.GetByteCountUTF8(haystack); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(haystack, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pneedle = needle) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, haystackEnd, (byte*)pneedle, needleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } }