// ------------------------------------------------------------------------------ // // 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. /// public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, ref 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; } fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = &needleEnd) { byte* ret = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, ref 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; } fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = &needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, ReadOnlySpan 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; } fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = needleEnd) { byte* ret = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, ReadOnlySpan 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; } fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, string 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; } fixed (byte* pneedle = needle) { byte* pStr1 = null; int pStrSize1 = 0; if (needleEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte* ret = ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, pStr1); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, ReadOnlySpan needle, string 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; } fixed (byte* pneedle = needle) { byte* pStr1 = null; int pStrSize1 = 0; if (needleEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, pStr0, (byte*)pneedle, pStr1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, string needle, ref 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* 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; } fixed (byte* pneedleEnd = &needleEnd) { byte* ret = ImStristrNative((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, string needle, ref 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* 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; } fixed (byte* pneedleEnd = &needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, string needle, ReadOnlySpan 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* 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; } fixed (byte* pneedleEnd = needleEnd) { byte* ret = ImStristrNative((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, string needle, ReadOnlySpan 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* 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; } fixed (byte* pneedleEnd = needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, pStr0, pStr1, (byte*)pneedleEnd)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(ReadOnlySpan haystack, string haystackEnd, string needle, string 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* 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* pStr2 = null; int pStrSize2 = 0; if (needleEnd != null) { pStrSize2 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } byte* ret = ImStristrNative((byte*)phaystack, pStr0, pStr1, pStr2); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static string ImStristrS(ReadOnlySpan haystack, string haystackEnd, string needle, string 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* 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* pStr2 = null; int pStrSize2 = 0; if (needleEnd != null) { pStrSize2 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative((byte*)phaystack, pStr0, pStr1, pStr2)); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ref byte haystackEnd, ref byte needle, ref 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) { fixed (byte* pneedle = &needle) { fixed (byte* pneedleEnd = &needleEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static string ImStristrS(string haystack, ref byte haystackEnd, ref byte needle, ref 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) { fixed (byte* pneedle = &needle) { fixed (byte* pneedleEnd = &needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ref byte haystackEnd, ref byte needle, ReadOnlySpan 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) { fixed (byte* pneedle = &needle) { fixed (byte* pneedleEnd = needleEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static string ImStristrS(string haystack, ref byte haystackEnd, ref byte needle, ReadOnlySpan 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) { fixed (byte* pneedle = &needle) { fixed (byte* pneedleEnd = needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ref byte haystackEnd, ref byte needle, string 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) { fixed (byte* pneedle = &needle) { byte* pStr1 = null; int pStrSize1 = 0; if (needleEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1); 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, ref byte haystackEnd, ref byte needle, string 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) { fixed (byte* pneedle = &needle) { byte* pStr1 = null; int pStrSize1 = 0; if (needleEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ref byte haystackEnd, ReadOnlySpan needle, ref 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) { fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = &needleEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static string ImStristrS(string haystack, ref byte haystackEnd, ReadOnlySpan needle, ref 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) { fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = &needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ref byte haystackEnd, ReadOnlySpan needle, ReadOnlySpan 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) { fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = needleEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static string ImStristrS(string haystack, ref byte haystackEnd, ReadOnlySpan needle, ReadOnlySpan 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) { fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ref byte haystackEnd, ReadOnlySpan needle, string 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) { fixed (byte* pneedle = needle) { byte* pStr1 = null; int pStrSize1 = 0; if (needleEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1); 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, ref byte haystackEnd, ReadOnlySpan needle, string 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) { fixed (byte* pneedle = needle) { byte* pStr1 = null; int pStrSize1 = 0; if (needleEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ref byte haystackEnd, string needle, ref 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* 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; } fixed (byte* pneedleEnd = &needleEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd); 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, ref byte haystackEnd, string needle, ref 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* 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; } fixed (byte* pneedleEnd = &needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ref byte haystackEnd, string needle, ReadOnlySpan 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* 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; } fixed (byte* pneedleEnd = needleEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd); 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, ref byte haystackEnd, string needle, ReadOnlySpan 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* 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; } fixed (byte* pneedleEnd = needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ref byte haystackEnd, string needle, string 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* 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* pStr2 = null; int pStrSize2 = 0; if (needleEnd != null) { pStrSize2 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, pStr2); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } 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, ref byte haystackEnd, string needle, string 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* 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* pStr2 = null; int pStrSize2 = 0; if (needleEnd != null) { pStrSize2 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, pStr2)); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ref byte needle, ref 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) { fixed (byte* pneedle = &needle) { fixed (byte* pneedleEnd = &needleEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, ref byte needle, ref 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) { fixed (byte* pneedle = &needle) { fixed (byte* pneedleEnd = &needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ref byte needle, ReadOnlySpan 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) { fixed (byte* pneedle = &needle) { fixed (byte* pneedleEnd = needleEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, ref byte needle, ReadOnlySpan 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) { fixed (byte* pneedle = &needle) { fixed (byte* pneedleEnd = needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ref byte needle, string 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) { fixed (byte* pneedle = &needle) { byte* pStr1 = null; int pStrSize1 = 0; if (needleEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1); 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, ReadOnlySpan haystackEnd, ref byte needle, string 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) { fixed (byte* pneedle = &needle) { byte* pStr1 = null; int pStrSize1 = 0; if (needleEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ref 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) { fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = &needleEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ref 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) { fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = &needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ReadOnlySpan 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) { fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = needleEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static string ImStristrS(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, ReadOnlySpan 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) { fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, ReadOnlySpan needle, string 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) { fixed (byte* pneedle = needle) { byte* pStr1 = null; int pStrSize1 = 0; if (needleEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1); 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, ReadOnlySpan haystackEnd, ReadOnlySpan needle, string 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) { fixed (byte* pneedle = needle) { byte* pStr1 = null; int pStrSize1 = 0; if (needleEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(needleEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, (byte*)pneedle, pStr1)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, string needle, ref 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* 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; } fixed (byte* pneedleEnd = &needleEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd); 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, ReadOnlySpan haystackEnd, string needle, ref 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* 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; } fixed (byte* pneedleEnd = &needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, string needle, ReadOnlySpan 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* 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; } fixed (byte* pneedleEnd = needleEnd) { byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd); 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, ReadOnlySpan haystackEnd, string needle, ReadOnlySpan 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* 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; } fixed (byte* pneedleEnd = needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, (byte*)pneedleEnd)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, ReadOnlySpan haystackEnd, string needle, string 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* 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* pStr2 = null; int pStrSize2 = 0; if (needleEnd != null) { pStrSize2 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } byte* ret = ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, pStr2); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } 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, ReadOnlySpan haystackEnd, string needle, string 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* 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* pStr2 = null; int pStrSize2 = 0; if (needleEnd != null) { pStrSize2 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, (byte*)phaystackEnd, pStr1, pStr2)); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(string haystack, string haystackEnd, ref byte needle, ref 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; } fixed (byte* pneedle = &needle) { fixed (byte* pneedleEnd = &needleEnd) { byte* ret = ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd); 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, ref byte needle, ref 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; } fixed (byte* pneedle = &needle) { fixed (byte* pneedleEnd = &needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, string haystackEnd, ref byte needle, ReadOnlySpan 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; } fixed (byte* pneedle = &needle) { fixed (byte* pneedleEnd = needleEnd) { byte* ret = ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd); 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, ref byte needle, ReadOnlySpan 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; } fixed (byte* pneedle = &needle) { fixed (byte* pneedleEnd = needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, string haystackEnd, ref byte needle, string 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; } fixed (byte* pneedle = &needle) { byte* pStr2 = null; int pStrSize2 = 0; if (needleEnd != null) { pStrSize2 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } byte* ret = ImStristrNative(pStr0, pStr1, (byte*)pneedle, pStr2); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } 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, ref byte needle, string 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; } fixed (byte* pneedle = &needle) { byte* pStr2 = null; int pStrSize2 = 0; if (needleEnd != null) { pStrSize2 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, pStr1, (byte*)pneedle, pStr2)); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(string haystack, string haystackEnd, ReadOnlySpan needle, ref 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; } fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = &needleEnd) { byte* ret = ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd); 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, ReadOnlySpan needle, ref 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; } fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = &needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, string haystackEnd, ReadOnlySpan needle, ReadOnlySpan 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; } fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = needleEnd) { byte* ret = ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd); 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, ReadOnlySpan needle, ReadOnlySpan 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; } fixed (byte* pneedle = needle) { fixed (byte* pneedleEnd = needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, pStr1, (byte*)pneedle, (byte*)pneedleEnd)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } /// /// To be documented. /// public static byte* ImStristr(string haystack, string haystackEnd, ReadOnlySpan needle, string 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; } fixed (byte* pneedle = needle) { byte* pStr2 = null; int pStrSize2 = 0; if (needleEnd != null) { pStrSize2 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } byte* ret = ImStristrNative(pStr0, pStr1, (byte*)pneedle, pStr2); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } 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, ReadOnlySpan needle, string 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; } fixed (byte* pneedle = needle) { byte* pStr2 = null; int pStrSize2 = 0; if (needleEnd != null) { pStrSize2 = Utils.GetByteCountUTF8(needleEnd); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needleEnd, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, pStr1, (byte*)pneedle, pStr2)); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(string haystack, string haystackEnd, string needle, ref 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* pStr2 = null; int pStrSize2 = 0; if (needle != null) { pStrSize2 = Utils.GetByteCountUTF8(needle); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needle, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } fixed (byte* pneedleEnd = &needleEnd) { byte* ret = ImStristrNative(pStr0, pStr1, pStr2, (byte*)pneedleEnd); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } 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, string needle, ref 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* pStr2 = null; int pStrSize2 = 0; if (needle != null) { pStrSize2 = Utils.GetByteCountUTF8(needle); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needle, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } fixed (byte* pneedleEnd = &needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, pStr1, pStr2, (byte*)pneedleEnd)); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static byte* ImStristr(string haystack, string haystackEnd, string needle, ReadOnlySpan 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* pStr2 = null; int pStrSize2 = 0; if (needle != null) { pStrSize2 = Utils.GetByteCountUTF8(needle); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needle, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } fixed (byte* pneedleEnd = needleEnd) { byte* ret = ImStristrNative(pStr0, pStr1, pStr2, (byte*)pneedleEnd); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } 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, string needle, ReadOnlySpan 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* pStr2 = null; int pStrSize2 = 0; if (needle != null) { pStrSize2 = Utils.GetByteCountUTF8(needle); if (pStrSize2 >= Utils.MaxStackallocSize) { pStr2 = Utils.Alloc(pStrSize2 + 1); } else { byte* pStrStack2 = stackalloc byte[pStrSize2 + 1]; pStr2 = pStrStack2; } int pStrOffset2 = Utils.EncodeStringUTF8(needle, pStr2, pStrSize2); pStr2[pStrOffset2] = 0; } fixed (byte* pneedleEnd = needleEnd) { string ret = Utils.DecodeStringUTF8(ImStristrNative(pStr0, pStr1, pStr2, (byte*)pneedleEnd)); if (pStrSize2 >= Utils.MaxStackallocSize) { Utils.Free(pStr2); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void ImStrTrimBlanksNative(byte* str) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[708])(str); #else ((delegate* unmanaged[Cdecl])funcTable[708])((nint)str); #endif } /// /// To be documented. /// public static void ImStrTrimBlanks(byte* str) { ImStrTrimBlanksNative(str); } /// /// To be documented. /// public static void ImStrTrimBlanks(ref byte str) { fixed (byte* pstr = &str) { ImStrTrimBlanksNative((byte*)pstr); } } /// /// To be documented. /// public static void ImStrTrimBlanks(ref 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; } ImStrTrimBlanksNative(pStr0); str = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte* ImStrSkipBlankNative(byte* str) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[709])(str); #else return (byte*)((delegate* unmanaged[Cdecl])funcTable[709])((nint)str); #endif } /// /// To be documented. /// public static byte* ImStrSkipBlank(byte* str) { byte* ret = ImStrSkipBlankNative(str); return ret; } /// /// To be documented. /// public static string ImStrSkipBlankS(byte* str) { string ret = Utils.DecodeStringUTF8(ImStrSkipBlankNative(str)); return ret; } /// /// To be documented. /// public static byte* ImStrSkipBlank(ref byte str) { fixed (byte* pstr = &str) { byte* ret = ImStrSkipBlankNative((byte*)pstr); return ret; } } /// /// To be documented. /// public static string ImStrSkipBlankS(ref byte str) { fixed (byte* pstr = &str) { string ret = Utils.DecodeStringUTF8(ImStrSkipBlankNative((byte*)pstr)); return ret; } } /// /// To be documented. /// public static byte* ImStrSkipBlank(ReadOnlySpan str) { fixed (byte* pstr = str) { byte* ret = ImStrSkipBlankNative((byte*)pstr); return ret; } } /// /// To be documented. /// public static string ImStrSkipBlankS(ReadOnlySpan str) { fixed (byte* pstr = str) { string ret = Utils.DecodeStringUTF8(ImStrSkipBlankNative((byte*)pstr)); return ret; } } /// /// To be documented. /// public static byte* ImStrSkipBlank(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 = ImStrSkipBlankNative(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImStrSkipBlankS(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(ImStrSkipBlankNative(pStr0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte ImCharIsBlankANative(byte c) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[710])(c); #else return (byte)((delegate* unmanaged[Cdecl])funcTable[710])(c); #endif } /// /// To be documented. /// public static bool ImCharIsBlankA(byte c) { byte ret = ImCharIsBlankANative(c); return ret != 0; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte ImCharIsBlankWNative(uint c) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[711])(c); #else return (byte)((delegate* unmanaged[Cdecl])funcTable[711])(c); #endif } /// /// To be documented. /// public static bool ImCharIsBlankW(uint c) { byte ret = ImCharIsBlankWNative(c); return ret != 0; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void ImFormatStringToTempBufferNative(byte** outBuf, byte** outBufEnd, byte* fmt) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[712])(outBuf, outBufEnd, fmt); #else ((delegate* unmanaged[Cdecl])funcTable[712])((nint)outBuf, (nint)outBufEnd, (nint)fmt); #endif } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(byte** outBuf, byte** outBufEnd, byte* fmt) { ImFormatStringToTempBufferNative(outBuf, outBufEnd, fmt); } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(ref byte* outBuf, byte** outBufEnd, byte* fmt) { fixed (byte** poutBuf = &outBuf) { ImFormatStringToTempBufferNative((byte**)poutBuf, outBufEnd, fmt); } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(byte** outBuf, ref byte* outBufEnd, byte* fmt) { fixed (byte** poutBufEnd = &outBufEnd) { ImFormatStringToTempBufferNative(outBuf, (byte**)poutBufEnd, fmt); } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(ref byte* outBuf, ref byte* outBufEnd, byte* fmt) { fixed (byte** poutBuf = &outBuf) { fixed (byte** poutBufEnd = &outBufEnd) { ImFormatStringToTempBufferNative((byte**)poutBuf, (byte**)poutBufEnd, fmt); } } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(byte** outBuf, byte** outBufEnd, ref byte fmt) { fixed (byte* pfmt = &fmt) { ImFormatStringToTempBufferNative(outBuf, outBufEnd, (byte*)pfmt); } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(byte** outBuf, byte** outBufEnd, ReadOnlySpan fmt) { fixed (byte* pfmt = fmt) { ImFormatStringToTempBufferNative(outBuf, outBufEnd, (byte*)pfmt); } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(byte** outBuf, byte** outBufEnd, string fmt) { byte* pStr0 = null; int pStrSize0 = 0; if (fmt != null) { pStrSize0 = Utils.GetByteCountUTF8(fmt); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImFormatStringToTempBufferNative(outBuf, outBufEnd, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(ref byte* outBuf, byte** outBufEnd, ref byte fmt) { fixed (byte** poutBuf = &outBuf) { fixed (byte* pfmt = &fmt) { ImFormatStringToTempBufferNative((byte**)poutBuf, outBufEnd, (byte*)pfmt); } } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(ref byte* outBuf, byte** outBufEnd, ReadOnlySpan fmt) { fixed (byte** poutBuf = &outBuf) { fixed (byte* pfmt = fmt) { ImFormatStringToTempBufferNative((byte**)poutBuf, outBufEnd, (byte*)pfmt); } } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(ref byte* outBuf, byte** outBufEnd, string fmt) { fixed (byte** poutBuf = &outBuf) { byte* pStr0 = null; int pStrSize0 = 0; if (fmt != null) { pStrSize0 = Utils.GetByteCountUTF8(fmt); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImFormatStringToTempBufferNative((byte**)poutBuf, outBufEnd, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(byte** outBuf, ref byte* outBufEnd, ref byte fmt) { fixed (byte** poutBufEnd = &outBufEnd) { fixed (byte* pfmt = &fmt) { ImFormatStringToTempBufferNative(outBuf, (byte**)poutBufEnd, (byte*)pfmt); } } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(byte** outBuf, ref byte* outBufEnd, ReadOnlySpan fmt) { fixed (byte** poutBufEnd = &outBufEnd) { fixed (byte* pfmt = fmt) { ImFormatStringToTempBufferNative(outBuf, (byte**)poutBufEnd, (byte*)pfmt); } } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(byte** outBuf, ref byte* outBufEnd, string fmt) { fixed (byte** poutBufEnd = &outBufEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (fmt != null) { pStrSize0 = Utils.GetByteCountUTF8(fmt); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImFormatStringToTempBufferNative(outBuf, (byte**)poutBufEnd, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(ref byte* outBuf, ref byte* outBufEnd, ref byte fmt) { fixed (byte** poutBuf = &outBuf) { fixed (byte** poutBufEnd = &outBufEnd) { fixed (byte* pfmt = &fmt) { ImFormatStringToTempBufferNative((byte**)poutBuf, (byte**)poutBufEnd, (byte*)pfmt); } } } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(ref byte* outBuf, ref byte* outBufEnd, ReadOnlySpan fmt) { fixed (byte** poutBuf = &outBuf) { fixed (byte** poutBufEnd = &outBufEnd) { fixed (byte* pfmt = fmt) { ImFormatStringToTempBufferNative((byte**)poutBuf, (byte**)poutBufEnd, (byte*)pfmt); } } } } /// /// To be documented. /// public static void ImFormatStringToTempBuffer(ref byte* outBuf, ref byte* outBufEnd, string fmt) { fixed (byte** poutBuf = &outBuf) { fixed (byte** poutBufEnd = &outBufEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (fmt != null) { pStrSize0 = Utils.GetByteCountUTF8(fmt); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImFormatStringToTempBufferNative((byte**)poutBuf, (byte**)poutBufEnd, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void ImFormatStringToTempBufferVNative(byte** outBuf, byte** outBufEnd, byte* fmt, nuint args) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[713])(outBuf, outBufEnd, fmt, args); #else ((delegate* unmanaged[Cdecl])funcTable[713])((nint)outBuf, (nint)outBufEnd, (nint)fmt, args); #endif } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(byte** outBuf, byte** outBufEnd, byte* fmt, nuint args) { ImFormatStringToTempBufferVNative(outBuf, outBufEnd, fmt, args); } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(ref byte* outBuf, byte** outBufEnd, byte* fmt, nuint args) { fixed (byte** poutBuf = &outBuf) { ImFormatStringToTempBufferVNative((byte**)poutBuf, outBufEnd, fmt, args); } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(byte** outBuf, ref byte* outBufEnd, byte* fmt, nuint args) { fixed (byte** poutBufEnd = &outBufEnd) { ImFormatStringToTempBufferVNative(outBuf, (byte**)poutBufEnd, fmt, args); } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(ref byte* outBuf, ref byte* outBufEnd, byte* fmt, nuint args) { fixed (byte** poutBuf = &outBuf) { fixed (byte** poutBufEnd = &outBufEnd) { ImFormatStringToTempBufferVNative((byte**)poutBuf, (byte**)poutBufEnd, fmt, args); } } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(byte** outBuf, byte** outBufEnd, ref byte fmt, nuint args) { fixed (byte* pfmt = &fmt) { ImFormatStringToTempBufferVNative(outBuf, outBufEnd, (byte*)pfmt, args); } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(byte** outBuf, byte** outBufEnd, ReadOnlySpan fmt, nuint args) { fixed (byte* pfmt = fmt) { ImFormatStringToTempBufferVNative(outBuf, outBufEnd, (byte*)pfmt, args); } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(byte** outBuf, byte** outBufEnd, string fmt, nuint args) { byte* pStr0 = null; int pStrSize0 = 0; if (fmt != null) { pStrSize0 = Utils.GetByteCountUTF8(fmt); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImFormatStringToTempBufferVNative(outBuf, outBufEnd, pStr0, args); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(ref byte* outBuf, byte** outBufEnd, ref byte fmt, nuint args) { fixed (byte** poutBuf = &outBuf) { fixed (byte* pfmt = &fmt) { ImFormatStringToTempBufferVNative((byte**)poutBuf, outBufEnd, (byte*)pfmt, args); } } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(ref byte* outBuf, byte** outBufEnd, ReadOnlySpan fmt, nuint args) { fixed (byte** poutBuf = &outBuf) { fixed (byte* pfmt = fmt) { ImFormatStringToTempBufferVNative((byte**)poutBuf, outBufEnd, (byte*)pfmt, args); } } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(ref byte* outBuf, byte** outBufEnd, string fmt, nuint args) { fixed (byte** poutBuf = &outBuf) { byte* pStr0 = null; int pStrSize0 = 0; if (fmt != null) { pStrSize0 = Utils.GetByteCountUTF8(fmt); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImFormatStringToTempBufferVNative((byte**)poutBuf, outBufEnd, pStr0, args); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(byte** outBuf, ref byte* outBufEnd, ref byte fmt, nuint args) { fixed (byte** poutBufEnd = &outBufEnd) { fixed (byte* pfmt = &fmt) { ImFormatStringToTempBufferVNative(outBuf, (byte**)poutBufEnd, (byte*)pfmt, args); } } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(byte** outBuf, ref byte* outBufEnd, ReadOnlySpan fmt, nuint args) { fixed (byte** poutBufEnd = &outBufEnd) { fixed (byte* pfmt = fmt) { ImFormatStringToTempBufferVNative(outBuf, (byte**)poutBufEnd, (byte*)pfmt, args); } } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(byte** outBuf, ref byte* outBufEnd, string fmt, nuint args) { fixed (byte** poutBufEnd = &outBufEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (fmt != null) { pStrSize0 = Utils.GetByteCountUTF8(fmt); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImFormatStringToTempBufferVNative(outBuf, (byte**)poutBufEnd, pStr0, args); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(ref byte* outBuf, ref byte* outBufEnd, ref byte fmt, nuint args) { fixed (byte** poutBuf = &outBuf) { fixed (byte** poutBufEnd = &outBufEnd) { fixed (byte* pfmt = &fmt) { ImFormatStringToTempBufferVNative((byte**)poutBuf, (byte**)poutBufEnd, (byte*)pfmt, args); } } } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(ref byte* outBuf, ref byte* outBufEnd, ReadOnlySpan fmt, nuint args) { fixed (byte** poutBuf = &outBuf) { fixed (byte** poutBufEnd = &outBufEnd) { fixed (byte* pfmt = fmt) { ImFormatStringToTempBufferVNative((byte**)poutBuf, (byte**)poutBufEnd, (byte*)pfmt, args); } } } } /// /// To be documented. /// public static void ImFormatStringToTempBufferV(ref byte* outBuf, ref byte* outBufEnd, string fmt, nuint args) { fixed (byte** poutBuf = &outBuf) { fixed (byte** poutBufEnd = &outBufEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (fmt != null) { pStrSize0 = Utils.GetByteCountUTF8(fmt); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImFormatStringToTempBufferVNative((byte**)poutBuf, (byte**)poutBufEnd, pStr0, args); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte* ImParseFormatFindStartNative(byte* format) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[714])(format); #else return (byte*)((delegate* unmanaged[Cdecl])funcTable[714])((nint)format); #endif } /// /// To be documented. /// public static byte* ImParseFormatFindStart(byte* format) { byte* ret = ImParseFormatFindStartNative(format); return ret; } /// /// To be documented. /// public static string ImParseFormatFindStartS(byte* format) { string ret = Utils.DecodeStringUTF8(ImParseFormatFindStartNative(format)); return ret; } /// /// To be documented. /// public static byte* ImParseFormatFindStart(ref byte format) { fixed (byte* pformat = &format) { byte* ret = ImParseFormatFindStartNative((byte*)pformat); return ret; } } /// /// To be documented. /// public static string ImParseFormatFindStartS(ref byte format) { fixed (byte* pformat = &format) { string ret = Utils.DecodeStringUTF8(ImParseFormatFindStartNative((byte*)pformat)); return ret; } } /// /// To be documented. /// public static byte* ImParseFormatFindStart(ReadOnlySpan format) { fixed (byte* pformat = format) { byte* ret = ImParseFormatFindStartNative((byte*)pformat); return ret; } } /// /// To be documented. /// public static string ImParseFormatFindStartS(ReadOnlySpan format) { fixed (byte* pformat = format) { string ret = Utils.DecodeStringUTF8(ImParseFormatFindStartNative((byte*)pformat)); return ret; } } /// /// To be documented. /// public static byte* ImParseFormatFindStart(string format) { byte* pStr0 = null; int pStrSize0 = 0; if (format != null) { pStrSize0 = Utils.GetByteCountUTF8(format); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImParseFormatFindStartNative(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImParseFormatFindStartS(string format) { byte* pStr0 = null; int pStrSize0 = 0; if (format != null) { pStrSize0 = Utils.GetByteCountUTF8(format); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImParseFormatFindStartNative(pStr0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static byte* ImParseFormatFindEndNative(byte* format) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[715])(format); #else return (byte*)((delegate* unmanaged[Cdecl])funcTable[715])((nint)format); #endif } /// /// To be documented. /// public static byte* ImParseFormatFindEnd(byte* format) { byte* ret = ImParseFormatFindEndNative(format); return ret; } /// /// To be documented. /// public static string ImParseFormatFindEndS(byte* format) { string ret = Utils.DecodeStringUTF8(ImParseFormatFindEndNative(format)); return ret; } /// /// To be documented. /// public static byte* ImParseFormatFindEnd(ref byte format) { fixed (byte* pformat = &format) { byte* ret = ImParseFormatFindEndNative((byte*)pformat); return ret; } } /// /// To be documented. /// public static string ImParseFormatFindEndS(ref byte format) { fixed (byte* pformat = &format) { string ret = Utils.DecodeStringUTF8(ImParseFormatFindEndNative((byte*)pformat)); return ret; } } /// /// To be documented. /// public static byte* ImParseFormatFindEnd(ReadOnlySpan format) { fixed (byte* pformat = format) { byte* ret = ImParseFormatFindEndNative((byte*)pformat); return ret; } } /// /// To be documented. /// public static string ImParseFormatFindEndS(ReadOnlySpan format) { fixed (byte* pformat = format) { string ret = Utils.DecodeStringUTF8(ImParseFormatFindEndNative((byte*)pformat)); return ret; } } /// /// To be documented. /// public static byte* ImParseFormatFindEnd(string format) { byte* pStr0 = null; int pStrSize0 = 0; if (format != null) { pStrSize0 = Utils.GetByteCountUTF8(format); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* ret = ImParseFormatFindEndNative(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static string ImParseFormatFindEndS(string format) { byte* pStr0 = null; int pStrSize0 = 0; if (format != null) { pStrSize0 = Utils.GetByteCountUTF8(format); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(format, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } string ret = Utils.DecodeStringUTF8(ImParseFormatFindEndNative(pStr0)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void ImParseFormatSanitizeForPrintingNative(byte* fmtIn, byte* fmtOut, ulong fmtOutSize) { #if NET5_0_OR_GREATER ((delegate* unmanaged[Cdecl])funcTable[716])(fmtIn, fmtOut, fmtOutSize); #else ((delegate* unmanaged[Cdecl])funcTable[716])((nint)fmtIn, (nint)fmtOut, fmtOutSize); #endif } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(byte* fmtIn, byte* fmtOut, ulong fmtOutSize) { ImParseFormatSanitizeForPrintingNative(fmtIn, fmtOut, fmtOutSize); } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(ref byte fmtIn, byte* fmtOut, ulong fmtOutSize) { fixed (byte* pfmtIn = &fmtIn) { ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, fmtOut, fmtOutSize); } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(ReadOnlySpan fmtIn, byte* fmtOut, ulong fmtOutSize) { fixed (byte* pfmtIn = fmtIn) { ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, fmtOut, fmtOutSize); } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(string fmtIn, byte* fmtOut, ulong fmtOutSize) { byte* pStr0 = null; int pStrSize0 = 0; if (fmtIn != null) { pStrSize0 = Utils.GetByteCountUTF8(fmtIn); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImParseFormatSanitizeForPrintingNative(pStr0, fmtOut, fmtOutSize); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(byte* fmtIn, ref byte fmtOut, ulong fmtOutSize) { fixed (byte* pfmtOut = &fmtOut) { ImParseFormatSanitizeForPrintingNative(fmtIn, (byte*)pfmtOut, fmtOutSize); } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(byte* fmtIn, ref string fmtOut, ulong fmtOutSize) { byte* pStr0 = null; int pStrSize0 = 0; if (fmtOut != null) { pStrSize0 = Utils.GetByteCountUTF8(fmtOut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImParseFormatSanitizeForPrintingNative(fmtIn, pStr0, fmtOutSize); fmtOut = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(ref byte fmtIn, ref byte fmtOut, ulong fmtOutSize) { fixed (byte* pfmtIn = &fmtIn) { fixed (byte* pfmtOut = &fmtOut) { ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize); } } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(ReadOnlySpan fmtIn, ref byte fmtOut, ulong fmtOutSize) { fixed (byte* pfmtIn = fmtIn) { fixed (byte* pfmtOut = &fmtOut) { ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize); } } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(string fmtIn, ref string fmtOut, ulong fmtOutSize) { byte* pStr0 = null; int pStrSize0 = 0; if (fmtIn != null) { pStrSize0 = Utils.GetByteCountUTF8(fmtIn); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (fmtOut != null) { pStrSize1 = Utils.GetByteCountUTF8(fmtOut); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(fmtOut, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } ImParseFormatSanitizeForPrintingNative(pStr0, pStr1, fmtOutSize); fmtOut = Utils.DecodeStringUTF8(pStr1); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(ref byte fmtIn, ref string fmtOut, ulong fmtOutSize) { fixed (byte* pfmtIn = &fmtIn) { byte* pStr0 = null; int pStrSize0 = 0; if (fmtOut != null) { pStrSize0 = Utils.GetByteCountUTF8(fmtOut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, pStr0, fmtOutSize); fmtOut = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(ReadOnlySpan fmtIn, ref string fmtOut, ulong fmtOutSize) { fixed (byte* pfmtIn = fmtIn) { byte* pStr0 = null; int pStrSize0 = 0; if (fmtOut != null) { pStrSize0 = Utils.GetByteCountUTF8(fmtOut); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmtOut, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, pStr0, fmtOutSize); fmtOut = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(string fmtIn, ref byte fmtOut, ulong fmtOutSize) { byte* pStr0 = null; int pStrSize0 = 0; if (fmtIn != null) { pStrSize0 = Utils.GetByteCountUTF8(fmtIn); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pfmtOut = &fmtOut) { ImParseFormatSanitizeForPrintingNative(pStr0, (byte*)pfmtOut, fmtOutSize); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(byte* fmtIn, byte* fmtOut, nuint fmtOutSize) { ImParseFormatSanitizeForPrintingNative(fmtIn, fmtOut, fmtOutSize); } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(ref byte fmtIn, byte* fmtOut, nuint fmtOutSize) { fixed (byte* pfmtIn = &fmtIn) { ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, fmtOut, fmtOutSize); } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(ReadOnlySpan fmtIn, byte* fmtOut, nuint fmtOutSize) { fixed (byte* pfmtIn = fmtIn) { ImParseFormatSanitizeForPrintingNative((byte*)pfmtIn, fmtOut, fmtOutSize); } } /// /// To be documented. /// public static void ImParseFormatSanitizeForPrinting(string fmtIn, byte* fmtOut, nuint fmtOutSize) { byte* pStr0 = null; int pStrSize0 = 0; if (fmtIn != null) { pStrSize0 = Utils.GetByteCountUTF8(fmtIn); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmtIn, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImParseFormatSanitizeForPrintingNative(pStr0, fmtOut, fmtOutSize); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } }