FastLED 3.9.15
Loading...
Searching...
No Matches

◆ appendFormatted() [3/7]

void fl::sstream::appendFormatted ( fl::i64 val)
private

Definition at line 76 of file strstream.cpp.hpp.

76 {
77 char buf[64] = {0};
78 int len;
79 if (mBase == 16 || mBase == 8) {
80 // For hex/oct, treat as unsigned bit pattern
81 len = fl::utoa64(static_cast<u64>(val), buf, mBase);
82 } else {
83 // For decimal, handle negative sign manually
84 if (val < 0) {
85 mStr.append("-", 1);
86 len = fl::utoa64(static_cast<u64>(-val), buf, mBase);
87 } else {
88 len = fl::utoa64(static_cast<u64>(val), buf, mBase);
89 }
90 }
91 mStr.append(buf, len);
92}
string mStr
Definition strstream.h:369
int utoa64(u64 value, char *sp, int radix)
Convert unsigned 64-bit integer to string buffer in given radix.
fl::u64 u64
Definition s16x16x4.h:221

References mBase, mStr, and fl::utoa64().

+ Here is the call graph for this function: