// ------------------------------------------------------------------------------
//
// 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(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[705])(str);
#else
((delegate* unmanaged[Cdecl])funcTable[705])((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[706])(str);
#else
return (byte*)((delegate* unmanaged[Cdecl])funcTable[706])((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[707])(c);
#else
return (byte)((delegate* unmanaged[Cdecl])funcTable[707])(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[708])(c);
#else
return (byte)((delegate* unmanaged[Cdecl])funcTable[708])(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[709])(outBuf, outBufEnd, fmt);
#else
((delegate* unmanaged[Cdecl])funcTable[709])((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[710])(outBuf, outBufEnd, fmt, args);
#else
((delegate* unmanaged[Cdecl])funcTable[710])((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[711])(format);
#else
return (byte*)((delegate* unmanaged[Cdecl])funcTable[711])((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[712])(format);
#else
return (byte*)((delegate* unmanaged[Cdecl])funcTable[712])((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, nuint fmtOutSize)
{
#if NET5_0_OR_GREATER
((delegate* unmanaged[Cdecl])funcTable[713])(fmtIn, fmtOut, fmtOutSize);
#else
((delegate* unmanaged[Cdecl])funcTable[713])((nint)fmtIn, (nint)fmtOut, fmtOutSize);
#endif
}
///
/// 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);
}
}
///
/// To be documented.
///
public static void ImParseFormatSanitizeForPrinting(byte* fmtIn, ref byte fmtOut, nuint fmtOutSize)
{
fixed (byte* pfmtOut = &fmtOut)
{
ImParseFormatSanitizeForPrintingNative(fmtIn, (byte*)pfmtOut, fmtOutSize);
}
}
///
/// To be documented.
///
public static void ImParseFormatSanitizeForPrinting(byte* fmtIn, ref string fmtOut, nuint 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, nuint 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, nuint 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, 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;
}
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, nuint 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, nuint 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, 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;
}
fixed (byte* pfmtOut = &fmtOut)
{
ImParseFormatSanitizeForPrintingNative(pStr0, (byte*)pfmtOut, fmtOutSize);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
///
/// To be documented.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static byte* ImParseFormatSanitizeForScanningNative(byte* fmtIn, byte* fmtOut, nuint fmtOutSize)
{
#if NET5_0_OR_GREATER
return ((delegate* unmanaged[Cdecl])funcTable[714])(fmtIn, fmtOut, fmtOutSize);
#else
return (byte*)((delegate* unmanaged[Cdecl])funcTable[714])((nint)fmtIn, (nint)fmtOut, fmtOutSize);
#endif
}
///
/// To be documented.
///
public static byte* ImParseFormatSanitizeForScanning(byte* fmtIn, byte* fmtOut, nuint fmtOutSize)
{
byte* ret = ImParseFormatSanitizeForScanningNative(fmtIn, fmtOut, fmtOutSize);
return ret;
}
///
/// To be documented.
///
public static string ImParseFormatSanitizeForScanningS(byte* fmtIn, byte* fmtOut, nuint fmtOutSize)
{
string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(fmtIn, fmtOut, fmtOutSize));
return ret;
}
///
/// To be documented.
///
public static byte* ImParseFormatSanitizeForScanning(ref byte fmtIn, byte* fmtOut, nuint fmtOutSize)
{
fixed (byte* pfmtIn = &fmtIn)
{
byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, fmtOut, fmtOutSize);
return ret;
}
}
///
/// To be documented.
///
public static string ImParseFormatSanitizeForScanningS(ref byte fmtIn, byte* fmtOut, nuint fmtOutSize)
{
fixed (byte* pfmtIn = &fmtIn)
{
string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, fmtOut, fmtOutSize));
return ret;
}
}
///
/// To be documented.
///
public static byte* ImParseFormatSanitizeForScanning(ReadOnlySpan fmtIn, byte* fmtOut, nuint fmtOutSize)
{
fixed (byte* pfmtIn = fmtIn)
{
byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, fmtOut, fmtOutSize);
return ret;
}
}
///
/// To be documented.
///
public static string ImParseFormatSanitizeForScanningS(ReadOnlySpan fmtIn, byte* fmtOut, nuint fmtOutSize)
{
fixed (byte* pfmtIn = fmtIn)
{
string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, fmtOut, fmtOutSize));
return ret;
}
}
///
/// To be documented.
///
public static byte* ImParseFormatSanitizeForScanning(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;
}
byte* ret = ImParseFormatSanitizeForScanningNative(pStr0, fmtOut, fmtOutSize);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
///
/// To be documented.
///
public static string ImParseFormatSanitizeForScanningS(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;
}
string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(pStr0, fmtOut, fmtOutSize));
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
///
/// To be documented.
///
public static byte* ImParseFormatSanitizeForScanning(byte* fmtIn, ref byte fmtOut, nuint fmtOutSize)
{
fixed (byte* pfmtOut = &fmtOut)
{
byte* ret = ImParseFormatSanitizeForScanningNative(fmtIn, (byte*)pfmtOut, fmtOutSize);
return ret;
}
}
///
/// To be documented.
///
public static string ImParseFormatSanitizeForScanningS(byte* fmtIn, ref byte fmtOut, nuint fmtOutSize)
{
fixed (byte* pfmtOut = &fmtOut)
{
string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(fmtIn, (byte*)pfmtOut, fmtOutSize));
return ret;
}
}
///
/// To be documented.
///
public static byte* ImParseFormatSanitizeForScanning(byte* fmtIn, ref string fmtOut, nuint 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;
}
byte* ret = ImParseFormatSanitizeForScanningNative(fmtIn, pStr0, fmtOutSize);
fmtOut = Utils.DecodeStringUTF8(pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
///
/// To be documented.
///
public static string ImParseFormatSanitizeForScanningS(byte* fmtIn, ref string fmtOut, nuint 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;
}
string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(fmtIn, pStr0, fmtOutSize));
fmtOut = Utils.DecodeStringUTF8(pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
///
/// To be documented.
///
public static byte* ImParseFormatSanitizeForScanning(ref byte fmtIn, ref byte fmtOut, nuint fmtOutSize)
{
fixed (byte* pfmtIn = &fmtIn)
{
fixed (byte* pfmtOut = &fmtOut)
{
byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize);
return ret;
}
}
}
///
/// To be documented.
///
public static string ImParseFormatSanitizeForScanningS(ref byte fmtIn, ref byte fmtOut, nuint fmtOutSize)
{
fixed (byte* pfmtIn = &fmtIn)
{
fixed (byte* pfmtOut = &fmtOut)
{
string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize));
return ret;
}
}
}
///
/// To be documented.
///
public static byte* ImParseFormatSanitizeForScanning(ReadOnlySpan fmtIn, ref byte fmtOut, nuint fmtOutSize)
{
fixed (byte* pfmtIn = fmtIn)
{
fixed (byte* pfmtOut = &fmtOut)
{
byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize);
return ret;
}
}
}
///
/// To be documented.
///
public static string ImParseFormatSanitizeForScanningS(ReadOnlySpan fmtIn, ref byte fmtOut, nuint fmtOutSize)
{
fixed (byte* pfmtIn = fmtIn)
{
fixed (byte* pfmtOut = &fmtOut)
{
string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, (byte*)pfmtOut, fmtOutSize));
return ret;
}
}
}
///
/// To be documented.
///
public static byte* ImParseFormatSanitizeForScanning(string fmtIn, ref string 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;
}
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;
}
byte* ret = ImParseFormatSanitizeForScanningNative(pStr0, pStr1, fmtOutSize);
fmtOut = Utils.DecodeStringUTF8(pStr1);
if (pStrSize1 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr1);
}
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
///
/// To be documented.
///
public static string ImParseFormatSanitizeForScanningS(string fmtIn, ref string 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;
}
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;
}
string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(pStr0, pStr1, fmtOutSize));
fmtOut = Utils.DecodeStringUTF8(pStr1);
if (pStrSize1 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr1);
}
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
///
/// To be documented.
///
public static byte* ImParseFormatSanitizeForScanning(ref byte fmtIn, ref string fmtOut, nuint 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;
}
byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, pStr0, fmtOutSize);
fmtOut = Utils.DecodeStringUTF8(pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
public static string ImParseFormatSanitizeForScanningS(ref byte fmtIn, ref string fmtOut, nuint 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;
}
string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, pStr0, fmtOutSize));
fmtOut = Utils.DecodeStringUTF8(pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
public static byte* ImParseFormatSanitizeForScanning(ReadOnlySpan fmtIn, ref string fmtOut, nuint 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;
}
byte* ret = ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, pStr0, fmtOutSize);
fmtOut = Utils.DecodeStringUTF8(pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
public static string ImParseFormatSanitizeForScanningS(ReadOnlySpan fmtIn, ref string fmtOut, nuint 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;
}
string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative((byte*)pfmtIn, pStr0, fmtOutSize));
fmtOut = Utils.DecodeStringUTF8(pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
public static byte* ImParseFormatSanitizeForScanning(string fmtIn, ref 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;
}
fixed (byte* pfmtOut = &fmtOut)
{
byte* ret = ImParseFormatSanitizeForScanningNative(pStr0, (byte*)pfmtOut, fmtOutSize);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
public static string ImParseFormatSanitizeForScanningS(string fmtIn, ref 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;
}
fixed (byte* pfmtOut = &fmtOut)
{
string ret = Utils.DecodeStringUTF8(ImParseFormatSanitizeForScanningNative(pStr0, (byte*)pfmtOut, fmtOutSize));
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int ImParseFormatPrecisionNative(byte* format, int defaultValue)
{
#if NET5_0_OR_GREATER
return ((delegate* unmanaged[Cdecl])funcTable[715])(format, defaultValue);
#else
return (int)((delegate* unmanaged[Cdecl])funcTable[715])((nint)format, defaultValue);
#endif
}
///
/// To be documented.
///
public static int ImParseFormatPrecision(byte* format, int defaultValue)
{
int ret = ImParseFormatPrecisionNative(format, defaultValue);
return ret;
}
///
/// To be documented.
///
public static int ImParseFormatPrecision(ref byte format, int defaultValue)
{
fixed (byte* pformat = &format)
{
int ret = ImParseFormatPrecisionNative((byte*)pformat, defaultValue);
return ret;
}
}
///
/// To be documented.
///
public static int ImParseFormatPrecision(ReadOnlySpan format, int defaultValue)
{
fixed (byte* pformat = format)
{
int ret = ImParseFormatPrecisionNative((byte*)pformat, defaultValue);
return ret;
}
}
///
/// To be documented.
///
public static int ImParseFormatPrecision(string format, int defaultValue)
{
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;
}
int ret = ImParseFormatPrecisionNative(pStr0, defaultValue);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
///
/// To be documented.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static byte* ImTextCharToUtf8Native(byte* outBuf, uint c)
{
#if NET5_0_OR_GREATER
return ((delegate* unmanaged[Cdecl])funcTable[716])(outBuf, c);
#else
return (byte*)((delegate* unmanaged[Cdecl])funcTable[716])((nint)outBuf, c);
#endif
}
///
/// To be documented.
///
public static byte* ImTextCharToUtf8(byte* outBuf, uint c)
{
byte* ret = ImTextCharToUtf8Native(outBuf, c);
return ret;
}
///
/// To be documented.
///
public static string ImTextCharToUtf8S(byte* outBuf, uint c)
{
string ret = Utils.DecodeStringUTF8(ImTextCharToUtf8Native(outBuf, c));
return ret;
}
///
/// To be documented.
///
public static byte* ImTextCharToUtf8(ref byte outBuf, uint c)
{
fixed (byte* poutBuf = &outBuf)
{
byte* ret = ImTextCharToUtf8Native((byte*)poutBuf, c);
return ret;
}
}
///
/// To be documented.
///
public static string ImTextCharToUtf8S(ref byte outBuf, uint c)
{
fixed (byte* poutBuf = &outBuf)
{
string ret = Utils.DecodeStringUTF8(ImTextCharToUtf8Native((byte*)poutBuf, c));
return ret;
}
}
///
/// To be documented.
///
public static byte* ImTextCharToUtf8(ReadOnlySpan outBuf, uint c)
{
fixed (byte* poutBuf = outBuf)
{
byte* ret = ImTextCharToUtf8Native((byte*)poutBuf, c);
return ret;
}
}
///
/// To be documented.
///
public static string ImTextCharToUtf8S(ReadOnlySpan outBuf, uint c)
{
fixed (byte* poutBuf = outBuf)
{
string ret = Utils.DecodeStringUTF8(ImTextCharToUtf8Native((byte*)poutBuf, c));
return ret;
}
}
///
/// To be documented.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int ImTextCharFromUtf8Native(uint* outChar, byte* inText, byte* inTextEnd)
{
#if NET5_0_OR_GREATER
return ((delegate* unmanaged[Cdecl])funcTable[717])(outChar, inText, inTextEnd);
#else
return (int)((delegate* unmanaged[Cdecl])funcTable[717])((nint)outChar, (nint)inText, (nint)inTextEnd);
#endif
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, byte* inText, byte* inTextEnd)
{
int ret = ImTextCharFromUtf8Native(outChar, inText, inTextEnd);
return ret;
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, byte* inText, byte* inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
int ret = ImTextCharFromUtf8Native((uint*)poutChar, inText, inTextEnd);
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, ref byte inText, byte* inTextEnd)
{
fixed (byte* pinText = &inText)
{
int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, inTextEnd);
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, ReadOnlySpan inText, byte* inTextEnd)
{
fixed (byte* pinText = inText)
{
int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, inTextEnd);
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, string inText, byte* inTextEnd)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inText != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inText);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
int ret = ImTextCharFromUtf8Native(outChar, pStr0, inTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, ref byte inText, byte* inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
fixed (byte* pinText = &inText)
{
int ret = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, inTextEnd);
return ret;
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, ReadOnlySpan inText, byte* inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
fixed (byte* pinText = inText)
{
int ret = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, inTextEnd);
return ret;
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, string inText, byte* inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inText != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inText);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
int ret = ImTextCharFromUtf8Native((uint*)poutChar, pStr0, inTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, byte* inText, ref byte inTextEnd)
{
fixed (byte* pinTextEnd = &inTextEnd)
{
int ret = ImTextCharFromUtf8Native(outChar, inText, (byte*)pinTextEnd);
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, byte* inText, ReadOnlySpan inTextEnd)
{
fixed (byte* pinTextEnd = inTextEnd)
{
int ret = ImTextCharFromUtf8Native(outChar, inText, (byte*)pinTextEnd);
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, byte* inText, string inTextEnd)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inTextEnd != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
int ret = ImTextCharFromUtf8Native(outChar, inText, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, byte* inText, ref byte inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
fixed (byte* pinTextEnd = &inTextEnd)
{
int ret = ImTextCharFromUtf8Native((uint*)poutChar, inText, (byte*)pinTextEnd);
return ret;
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, byte* inText, ReadOnlySpan inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
fixed (byte* pinTextEnd = inTextEnd)
{
int ret = ImTextCharFromUtf8Native((uint*)poutChar, inText, (byte*)pinTextEnd);
return ret;
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, byte* inText, string inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inTextEnd != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
int ret = ImTextCharFromUtf8Native((uint*)poutChar, inText, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, ref byte inText, ref byte inTextEnd)
{
fixed (byte* pinText = &inText)
{
fixed (byte* pinTextEnd = &inTextEnd)
{
int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, (byte*)pinTextEnd);
return ret;
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, ReadOnlySpan inText, ReadOnlySpan inTextEnd)
{
fixed (byte* pinText = inText)
{
fixed (byte* pinTextEnd = inTextEnd)
{
int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, (byte*)pinTextEnd);
return ret;
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, string inText, string inTextEnd)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inText != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inText);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
byte* pStr1 = null;
int pStrSize1 = 0;
if (inTextEnd != null)
{
pStrSize1 = Utils.GetByteCountUTF8(inTextEnd);
if (pStrSize1 >= Utils.MaxStackallocSize)
{
pStr1 = Utils.Alloc(pStrSize1 + 1);
}
else
{
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
pStr1 = pStrStack1;
}
int pStrOffset1 = Utils.EncodeStringUTF8(inTextEnd, pStr1, pStrSize1);
pStr1[pStrOffset1] = 0;
}
int ret = ImTextCharFromUtf8Native(outChar, pStr0, pStr1);
if (pStrSize1 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr1);
}
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, ref byte inText, ReadOnlySpan inTextEnd)
{
fixed (byte* pinText = &inText)
{
fixed (byte* pinTextEnd = inTextEnd)
{
int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, (byte*)pinTextEnd);
return ret;
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, ref byte inText, string inTextEnd)
{
fixed (byte* pinText = &inText)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inTextEnd != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, ReadOnlySpan inText, ref byte inTextEnd)
{
fixed (byte* pinText = inText)
{
fixed (byte* pinTextEnd = &inTextEnd)
{
int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, (byte*)pinTextEnd);
return ret;
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, ReadOnlySpan inText, string inTextEnd)
{
fixed (byte* pinText = inText)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inTextEnd != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
int ret = ImTextCharFromUtf8Native(outChar, (byte*)pinText, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, string inText, ref byte inTextEnd)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inText != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inText);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
fixed (byte* pinTextEnd = &inTextEnd)
{
int ret = ImTextCharFromUtf8Native(outChar, pStr0, (byte*)pinTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(uint* outChar, string inText, ReadOnlySpan inTextEnd)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inText != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inText);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
fixed (byte* pinTextEnd = inTextEnd)
{
int ret = ImTextCharFromUtf8Native(outChar, pStr0, (byte*)pinTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, ref byte inText, ref byte inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
fixed (byte* pinText = &inText)
{
fixed (byte* pinTextEnd = &inTextEnd)
{
int ret = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, (byte*)pinTextEnd);
return ret;
}
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, ReadOnlySpan inText, ReadOnlySpan inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
fixed (byte* pinText = inText)
{
fixed (byte* pinTextEnd = inTextEnd)
{
int ret = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, (byte*)pinTextEnd);
return ret;
}
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, string inText, string inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inText != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inText);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
byte* pStr1 = null;
int pStrSize1 = 0;
if (inTextEnd != null)
{
pStrSize1 = Utils.GetByteCountUTF8(inTextEnd);
if (pStrSize1 >= Utils.MaxStackallocSize)
{
pStr1 = Utils.Alloc(pStrSize1 + 1);
}
else
{
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
pStr1 = pStrStack1;
}
int pStrOffset1 = Utils.EncodeStringUTF8(inTextEnd, pStr1, pStrSize1);
pStr1[pStrOffset1] = 0;
}
int ret = ImTextCharFromUtf8Native((uint*)poutChar, pStr0, pStr1);
if (pStrSize1 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr1);
}
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, ref byte inText, ReadOnlySpan inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
fixed (byte* pinText = &inText)
{
fixed (byte* pinTextEnd = inTextEnd)
{
int ret = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, (byte*)pinTextEnd);
return ret;
}
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, ref byte inText, string inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
fixed (byte* pinText = &inText)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inTextEnd != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
int ret = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, ReadOnlySpan inText, ref byte inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
fixed (byte* pinText = inText)
{
fixed (byte* pinTextEnd = &inTextEnd)
{
int ret = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, (byte*)pinTextEnd);
return ret;
}
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, ReadOnlySpan inText, string inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
fixed (byte* pinText = inText)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inTextEnd != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inTextEnd, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
int ret = ImTextCharFromUtf8Native((uint*)poutChar, (byte*)pinText, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, string inText, ref byte inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inText != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inText);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
fixed (byte* pinTextEnd = &inTextEnd)
{
int ret = ImTextCharFromUtf8Native((uint*)poutChar, pStr0, (byte*)pinTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
}
///
/// To be documented.
///
public static int ImTextCharFromUtf8(ref uint outChar, string inText, ReadOnlySpan inTextEnd)
{
fixed (uint* poutChar = &outChar)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inText != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inText);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
fixed (byte* pinTextEnd = inTextEnd)
{
int ret = ImTextCharFromUtf8Native((uint*)poutChar, pStr0, (byte*)pinTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
}
}
///
/// To be documented.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int ImTextCountCharsFromUtf8Native(byte* inText, byte* inTextEnd)
{
#if NET5_0_OR_GREATER
return ((delegate* unmanaged[Cdecl])funcTable[718])(inText, inTextEnd);
#else
return (int)((delegate* unmanaged[Cdecl])funcTable[718])((nint)inText, (nint)inTextEnd);
#endif
}
///
/// To be documented.
///
public static int ImTextCountCharsFromUtf8(byte* inText, byte* inTextEnd)
{
int ret = ImTextCountCharsFromUtf8Native(inText, inTextEnd);
return ret;
}
///
/// To be documented.
///
public static int ImTextCountCharsFromUtf8(ref byte inText, byte* inTextEnd)
{
fixed (byte* pinText = &inText)
{
int ret = ImTextCountCharsFromUtf8Native((byte*)pinText, inTextEnd);
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCountCharsFromUtf8(ReadOnlySpan inText, byte* inTextEnd)
{
fixed (byte* pinText = inText)
{
int ret = ImTextCountCharsFromUtf8Native((byte*)pinText, inTextEnd);
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCountCharsFromUtf8(string inText, byte* inTextEnd)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (inText != null)
{
pStrSize0 = Utils.GetByteCountUTF8(inText);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(inText, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
int ret = ImTextCountCharsFromUtf8Native(pStr0, inTextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
return ret;
}
///
/// To be documented.
///
public static int ImTextCountCharsFromUtf8(byte* inText, ref byte inTextEnd)
{
fixed (byte* pinTextEnd = &inTextEnd)
{
int ret = ImTextCountCharsFromUtf8Native(inText, (byte*)pinTextEnd);
return ret;
}
}
///
/// To be documented.
///
public static int ImTextCountCharsFromUtf8(byte* inText, ReadOnlySpan inTextEnd)
{
fixed (byte* pinTextEnd = inTextEnd)
{
int ret = ImTextCountCharsFromUtf8Native(inText, (byte*)pinTextEnd);
return ret;
}
}
}
}