FastLED 3.9.15
Loading...
Searching...
No Matches
ostream.cpp.hpp
Go to the documentation of this file.
1#include "fl/stl/ostream.h"
2#include "fl/stl/charconv.h"
3
4namespace fl {
5
6// Global cout instance for immediate output
8
9// endl manipulator instance
11
12// Numeric output operators with formatting support
14 char buf[64] = {0};
15 fl::itoa(static_cast<fl::i32>(n), buf, mBase);
16 print(buf);
17 return *this;
18}
19
21 char buf[64] = {0};
22 fl::utoa32(static_cast<fl::u32>(n), buf, mBase);
23 print(buf);
24 return *this;
25}
26
28 char buf[64] = {0};
29 fl::itoa(static_cast<fl::i32>(n), buf, mBase);
30 print(buf);
31 return *this;
32}
33
35 char buf[64] = {0};
36 fl::itoa(n, buf, mBase);
37 print(buf);
38 return *this;
39}
40
42 char buf[64] = {0};
43 fl::utoa32(n, buf, mBase);
44 print(buf);
45 return *this;
46}
47
48// Manipulator operator implementations (declared as friends in ostream)
50 os.mBase = 16;
51 return os;
52}
53
55 os.mBase = 10;
56 return os;
57}
58
60 os.mBase = 8;
61 return os;
62}
63
64} // namespace fl
int mBase
Definition ostream.h:88
ostream()=default
ostream & operator<<(const char *str) FL_NOEXCEPT
Definition ostream.h:21
unsigned char u8
Definition s16x16x4.h:132
signed char i8
Definition s16x16x4.h:131
ostream cout
int itoa(i32 value, char *sp, int radix)
Convert signed 32-bit integer to string buffer in given radix.
const endl_t endl
void print(const char *str)
ostream & operator<<(ostream &os, const hex_t &) FL_NOEXCEPT
int utoa32(u32 value, char *sp, int radix)
Convert unsigned 32-bit integer to string buffer in given radix.
Base definition for an LED controller.
Definition crgb.hpp:179