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

◆ to_octal()

template<typename T>
fl::string fl::printf_detail::to_octal ( T value)
inline

Definition at line 201 of file stdio.h.

201 {
202 if (value == 0) {
203 return "0";
204 }
205
206 char buffer[32]; // Enough for 64-bit octal
207 int pos = 31;
208 buffer[pos] = '\0';
209
210 unsigned long long val = static_cast<unsigned long long>(value);
211 while (val > 0) {
212 buffer[--pos] = '0' + (val & 7);
213 val >>= 3;
214 }
215
216 return fl::string(&buffer[pos]);
217}
uint8_t pos
Definition Blur.ino:11
constexpr int type_rank< T >::value

References FL_NOEXCEPT, pos, and fl::type_rank< T >::value.

Referenced by format_arg().

+ Here is the caller graph for this function: