StringParser::ResultString<char, ulong> StringParser::ToString(const ulong& inValue) { ResultString<char, ulong> temp; char* end = u32toa_branchlut(inValue, temp.MutableBuffer()); temp.ForceSetLength(end - temp.Buffer()); return temp; }
StringParser::ResultString<wchar_t, uint32> StringParser::ToWString(const uint32& inValue) { ResultString<wchar_t, uint32> temp; wchar_t* end = u32toa_branchlut(inValue, temp.MutableBuffer()); temp.ForceSetLength(end - temp.Buffer()); return temp; }
char* i32toa_branchlut(int32_t value, char* buffer) { uint32_t u = (uint32_t)value; if (value < 0) { *buffer++ = '-'; u = ~u + 1; } return u32toa_branchlut(u, buffer); }
void i32toa_branchlut(int32_t value, char* buffer) { uint32_t u = (uint32_t)(value); if (value < 0) { *buffer++ = '-'; u = ~u + 1; } u32toa_branchlut(u, buffer); }