Beispiel #1
0
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;
}
Beispiel #2
0
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;
}
Beispiel #3
0
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);
}
Beispiel #4
0
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);
}