MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / valueToString

Function valueToString

Source/JSON/jsoncpp.cpp:3740–3754  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3738}
3739
3740std::string valueToString(LargestInt value) {
3741 UIntToStringBuffer buffer;
3742 char* current = buffer + sizeof(buffer);
3743 if (value == Value::minLargestInt) {
3744 uintToString(LargestUInt(Value::maxLargestInt) + 1, current);
3745 *--current = '-';
3746 } else if (value < 0) {
3747 uintToString(LargestUInt(-value), current);
3748 *--current = '-';
3749 } else {
3750 uintToString(LargestUInt(value), current);
3751 }
3752 assert(current >= buffer);
3753 return current;
3754}
3755
3756std::string valueToString(LargestUInt value) {
3757 UIntToStringBuffer buffer;

Callers 2

asStringMethod · 0.70
writeValueMethod · 0.70

Calls 3

isfiniteFunction · 0.85
uintToStringFunction · 0.70
fixNumericLocaleFunction · 0.70

Tested by

no test coverage detected