StringParser::ResultString<char, ulong> StringParser::ToString(const ulong& inValue) { ResultString<char, ulong> temp; char* end = u64toa_branchlut(inValue, temp.MutableBuffer()); temp.ForceSetLength(end - temp.Buffer()); return temp; }
StringParser::ResultString<wchar_t, uint64> StringParser::ToWString(const uint64& inValue) { ResultString<wchar_t, uint64> temp; wchar_t* end = u64toa_branchlut(inValue, temp.MutableBuffer()); temp.ForceSetLength(end - temp.Buffer()); return temp; }
char* i64toa_branchlut(int64_t value, char* buffer) { uint64_t u = (uint64_t)value; if (value < 0) { *buffer++ = '-'; u = ~u + 1; } return u64toa_branchlut(u, buffer); }
void i64toa_branchlut(int64_t value, char* buffer) { uint64_t u = (uint64_t)(value); if (value < 0) { *buffer++ = '-'; u = ~u + 1; } u64toa_branchlut(u, buffer); }