FastLED 3.10.6
Loading...
Searching...
No Matches

◆ to_octal()

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

Definition at line 228 of file stdio.h.

228 {
229 if (value == 0) {
230 return "0";
231 }
232
233 char buffer[32]; // Enough for 64-bit octal
234 int pos = 31;
235 buffer[pos] = '\0';
236
237 unsigned long long val = static_cast<unsigned long long>(value);
238 while (val > 0) {
239 buffer[--pos] = '0' + (val & 7);
240 val >>= 3;
241 }
242
243 return fl::string(&buffer[pos]);
244}
uint8_t pos
Definition Blur.ino:11
constexpr int type_rank< T >::value

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

Referenced by format_arg(), and format_integral().

+ Here is the caller graph for this function: